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

Struct viewer debugging tool #19629

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

kotcrab
Copy link
Contributor

@kotcrab kotcrab commented Nov 12, 2024

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:

image

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 the Connect button. Now you can start exploring the globals, for most interesting see g_logoTask and g_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 the Connect button. Note that your Ghidra image should be at 0x8804000 for globals to align.

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

Successfully merging this pull request may close these issues.

1 participant