-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Struct viewer debugging tool #19629
Struct viewer debugging tool #19629
Conversation
Reorganize add breakpoint menu Style fixes
f51ec24
to
d3c840c
Compare
Fix open check
d3c840c
to
2c49cae
Compare
Good idea, I like that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skimmed through it, code is nice, clear and self-contained, looks good.
One request: GhidraClient.h really needs a comment clarifying that this is not an official Ghidra protocol, but one exposed by your plugin. The comment should contain a link to your repo, and at a minimum a brief usage description, like the one you wrote in this PR. And I guess a link to this PR couldn't hurt.
Few more code comments and misc clean up
Very nice, good idea to show it in the UI too! Minor, we generally only use // for comments, even large blocks, but I'm not gonna block this on that, just letting you know for future changes. |
This PR adds struct viewer debugging tool. It visualizes objects data in game memory using data types and symbols fetched from your Ghidra project. It also allows to set memory breakpoints and edit field values which is helpful when reverse engineering unknown types.
This is how it looks in action:
The types are fetched over REST API that Ghidra exposes with my ghidra-rest-api extension. This allows for a very efficient workflow where you can edit some types in Ghidra and instantly refresh them in Struct viewer to see updated object memory layout.
How to try it
If you don't have a Ghidra project
I prepared mock API you can use for testing this without setting up Ghidra at all. You will just need Mockoon and the API json I prepared here. With that in Mockoon do
File
->Open local environment
, select json file then press the green button to start the mock server.The types and symbols are for Fate/Extra CCC, with that game booted you can open the
Struct viewer
and press theConnect
button. Now you can start exploring the globals, for most interesting seeg_logoTask
andg_TitleTask
(the first one will be populated when logos are visible and the second one after getting to the title screen).If you have a Ghidra project
Then you just need to install my ghidra-rest-api extension, start API server in Ghidra. Open the
Struct viewer
and press theConnect
button. Note that your Ghidra image should be at0x8804000
for globals to align.