Replies: 2 comments
-
#850 starts to fix cases similar to this. Any publicly available target available with that asm snippet in it? Probably I can address the issue but given the different patterns I am testing on I wont be sure its comprehensive. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@GregoryMorse cool that you're looking into switches. thanks for pinging this ticket. I dont have the binary atm, but for example: main() in nano shows this issue, presumably the same from my target binary. https://packages.debian.org/stretch/mips/nano/download |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'll start with this is using
lwx
from #709This MIPS binary will do something like
It seems like there is enough information to create a switch there, but I get "too many branches". I'm reading up on jumptable.cc now in combination of @d-millar 's dump pcode script to see if anything sticks out.
Is this just a common problem spot due to assumed registers & PIC? Any things to try in ghidra itself?
This is not 100% of the time but by eye I see no difference when it does work. working on making a minimized case manually to trigger, but my first attempt it made the switch.
Side question, if I build ghidra, what is (if there is one) the suggested debug print method to get output within jumptable.cc
Edit: the function does assume t9 and gp correctly and the listing/decompiler both use those values to display functions/globals/etc correctly
Beta Was this translation helpful? Give feedback.
All reactions