Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving the decompilation #40

Open
Nemoumbra opened this issue Apr 16, 2024 · 0 comments
Open

Improving the decompilation #40

Nemoumbra opened this issue Apr 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Nemoumbra
Copy link

Quoting kotcrab:

Right now the writes to VFPU control registers are modelled without side-effects

This causes the following incorrect decompilation results:
image

Next, there are 2 very cruel Libc functions setjmp and longjmp.

The only issue I have with the decompilation of setjmp is the name register0x00000074 for sp.

image

The function longjmp breaks the calling convention by overwriting the preserved regs, but Ghidra silently swallows the error (generally speaking, Ghidra often leaves out the stack operations from the decompilation). I certainly don't wanna miss anything and I even have Eliminate unreachable code disabled by default, but here it doesn't help.

image

I hope fixing the VFPU and the sp name is easy. I really hope something can be done with longjump too, but I'm afraid the calling convention is to blame.

@kotcrab kotcrab added the enhancement New feature or request label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants