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

Skipped local variables #1

Open
byvar opened this issue Apr 27, 2021 · 2 comments
Open

Skipped local variables #1

byvar opened this issue Apr 27, 2021 · 2 comments

Comments

@byvar
Copy link

byvar commented Apr 27, 2021

Hi rafalh,

Thank you so much for developing this! As far as I can tell you created the only DWARF1 analyzer for Ghidra or IDA, and it is extremely helpful for our reverse engineering project. At the moment we do have one big issue with it though:

We applied the DWARF1 analyzer to a Gamecube game. This mostly works, however we noticed that the majority of local variables are being skipped. Is there anything we can do to improve this?

Here's a comparison of the info imported into Ghidra vs the info shown in DWARF Explorer ( https://github.com/sevaa/dwex ):
image

You can find the ELF here: https://raym.app/data/jade/kingkong_gc/jadegc_ia2cr.elf
We use this to load Gamecube ELF files: https://github.com/aldelaro5/ghidra-gekko-broadway-lang

Thank you in advance! :)

@byvar
Copy link
Author

byvar commented Apr 28, 2021

Another PS2 ELF we are very interested in is this: https://app.box.com/s/5py2ayri10s0qzxxt9n9mvj5572actjs
However it seems to have the same issue as the Gamecube ELF above:
image

Any idea what is causing these to be ignored?
Thank you!

@rafalh
Copy link
Owner

rafalh commented Apr 28, 2021

Hello! It's very nice to hear that my work is useful for you.

Any idea what is causing these to be ignored?

It's simple - local variables are not currently supported. Only functions' parameters are imported from DWARF data. I didn't really need local variables and considered them much harder to implement than function parameters so I left them unimplemented, but it would be nice to have them supported. I'm not planning to work on them anytime soon so if you have time I am open for a pull request adding them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants