jgoemat Master Cheater Reputation: 22
Joined: 25 Sep 2011 Posts: 252
|
Posted: Sat Apr 14, 2018 11:04 pm Post subject: Mono-aware disassembly? |
|
|
I was thinking it would be nice to have the disassembler put field names in comments if mono is enabled. I tried to hook in with onPostDisassemble
Code: | dd = getVisibleDisassembler()
print("Syntax highlighting? "..tostring(dd.syntaxhighlighting))
function onPostDisasemble(sender, address, LastDisassembleData, result, description)
-- sender: Disassembler
-- address: integer
-- LastDisassembleData: Table
-- result: string
-- description: string
-- returns result, description
print("Disasemble post at "..string.format("%X", address))
return result, description
end
dd.OnPostDisassemble = onPostDisassemble
dd_data = dd.getLastDisassembleData()
print("Last Disassembled Address: "..string.format("%X", dd_data.address))
return dd_data
|
But I never see it print anything and the last disassembled address does change if I scroll a bit in the disassembly window. I've tried to use registerGlobalDisassembleOverride and it does get called, but it keeps getting called over and over for the same visible bytes and the disassembly windows just show "00" for bytes. Same for getVisibleDisassembler().OnDisassembleOverride:
Code: | getVisibleDisassembler().OnDisassembleOverride = function(sender, address, data)
print(string.format("Disassembling %X", address))
return "opcode", "description"
end |
I'm assuming that is the right way to return "opcode, description" and that those would just appear in the opcode and comments columns in the disassembly window... How am I using these wrong?
|
|