Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.