Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Recover global GP register writes non functioning in Ghidra 10 #78

Open
weirdbeardgame opened this issue Jun 18, 2022 · 5 comments
Open

Comments

@weirdbeardgame
Copy link

weirdbeardgame commented Jun 18, 2022

Game: Fatal Frame 2. More specifically the European demo with the debug functionality

OS: Arch Linux

Ghidra: 10.1.4

Issue:
In Ghidra 9 any function that uses GP register for anything reads writes etc all variables and values related will resolve name-wise and appear correct. In Ghidra 10 this will not occur and all globals will appear as random addresses unless the initial value on the GP register is manually set using set register GP(64)

What it's currently showing:
Current

What it should be showing:
Should

@astrelsky
Copy link
Contributor

Try opening the python interpreter in the Window toolbar and enter the following

createLabel(toAddr("0x3f57f0"), "_mips_gp_value", True)

After the label is created the problem should go away once you re-run the constant reference analyzer. There is definitely a bug somewhere though since it was set fine in the past.

@weirdbeardgame
Copy link
Author

@astrelsky That definitely made it work at least so. Thanks

@astrelsky
Copy link
Contributor

@astrelsky That definitely made it work at least so. Thanks

Well that's a good sign. May you check the Ghidra application.log for any errors coming from the constant analyzer before you added the label? It will help narrow down the root problem.

@weirdbeardgame
Copy link
Author

Yeah totally, where would I find that on arch?

@astrelsky
Copy link
Contributor

Yeah totally, where would I find that on arch?

It should be in ~/.ghidra/ghidra_version_folder/application.log I don't have the actual paths on hand but you should be able to locate it with that.

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

No branches or pull requests

2 participants