public override AssemblerLine DisassembleInstruction(TargetMemoryAccess memory,
Method method,
TargetAddress address)
{
lock (this) {
memory_exception = null;
sb = new StringBuilder ();
address = new TargetAddress (memory.AddressDomain, address.Address);
string insn;
int insn_size;
try {
this.memory = memory;
current_method = method;
insn_size = bfd_glue_disassemble_insn (handle, address.Address);
if (memory_exception != null)
return null;
insn = sb.ToString ();
} finally {
sb = null;
this.memory = null;
memory_exception = null;
current_method = null;
}
Symbol label = null;
if (process != null)
label = process.SymbolTableManager.SimpleLookup (address, true);
string label_name = null;
if (label != null)
label_name = label.ToString ();
return new AssemblerLine (
label_name, address, (byte) insn_size, insn);
}
}