You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rebasing causes the debugger to tell the decompiler that it's PIE, which means that it needs to rebase everything. But then the decompiler has essentially turned the binary into a Non-PIE address layout, which conflicts with what the debugger is telling the decompiler.
but the second part of your answer there seems to describe a different problem, so I'm opening a new issue specific to this plugin.
This causes both to send massive addresses (the ones seen inside the debugger), which both causes a mismatch and a number too large to send on XML.
In this case, after rebasing a binary to 0x555555554000, I get the following error: Decompiler server sent back a response without decompilation lines for 0x4360. I think GDB is sending the relative address to de decompiler, but Ghidra uses that value as an absolute address and not an offset, so if I set 0x0 as a base everything still works fine, but otherwise I get the wrong code or nothing at all.
Hi, I’m going to transfer this issue for easier tracking, since I plan on archiving this repo and moving all the code into the d2d repo.
mahaloz
transferred this issue from mahaloz/d2d-ghidra-plugin
Jun 7, 2023
mahaloz
changed the title
Unable to decompile after rebasing addreses of PIE binary
Ghidra: Unable to decompile after rebasing addreses of PIE binary
Jun 7, 2023
Hi,
this is similar to #60
but the second part of your answer there seems to describe a different problem, so I'm opening a new issue specific to this plugin.
In this case, after rebasing a binary to 0x555555554000, I get the following error:
Decompiler server sent back a response without decompilation lines for 0x4360
. I think GDB is sending the relative address to de decompiler, but Ghidra uses that value as an absolute address and not an offset, so if I set 0x0 as a base everything still works fine, but otherwise I get the wrong code or nothing at all.For what I've seen in the source code the plugin does use the new base in ghidra, so I don't know where is the problem.
https://github.com/mahaloz/d2d-ghidra-plugin/blob/5bd8a4cadf2e7fbb29e6c801ccf117ad3d0b1550/src/main/java/decomp2dbg/D2DGhidraServerAPI.java#L46
https://github.com/mahaloz/d2d-ghidra-plugin/blob/5bd8a4cadf2e7fbb29e6c801ccf117ad3d0b1550/src/main/java/decomp2dbg/D2DPlugin.java#L139-L155
The text was updated successfully, but these errors were encountered: