radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.42k stars 2.98k forks source link

add debug infos to RBinPlugin for gameboy #17435

Open gogo2464 opened 4 years ago

gogo2464 commented 4 years ago

Is your feature request related to a problem? Please describe. I'm always frustrated when I want to analyze a gameboy rom decompiled and then recompiled with more documentation in the code. I see a lot of missing information such as function and label names. Radare2 does not handle debug infos such as function names. The gameboy emulator BGB handle these.

Describe the solution you'd like A plugin in radare2 to handle debug infos.

Describe alternatives you've considered

Additional context I believed I should have a RAnal plugin. I was wrong. I have opened a wrong issue https://github.com/radareorg/radare2/issues/17393.

A .dbginfo is missing in the currrent plugin. See this code. If we add one, we can solve this issue.

gogo2464 commented 4 years ago

I may write this plugin. I will do it when I will have closed this issue: See. @condret may also be interested to write this plugin.

condret commented 2 years ago

afaik gb files have no debug symbols

gogo2464 commented 2 years ago

@condret I am sure this is possible. The debug symbols are stored into another file. bgb does this. You can compile https://github.com/pret/pokered and run BGB if you want to test. This work on my computer.

condret commented 2 years ago

yeah, I know this exists, it's like a pdb file. tbh I'd prefere, if we just had a script as a r2pm package for loading these informations .... buuut we can do it in the plugin if you want

gogo2464 commented 2 years ago

I planned to write this plugin. Can I? I just need more time.

condret commented 2 years ago

no need to write a new plugin, you can extend the gb plugin that we already have

gogo2464 commented 2 years ago

Yes this is what I mean.