lab313ru / ghidra_psx_ldr

Sony Playstation PSX executables loader for GHIDRA
231 stars 31 forks source link

gp and sp used as variables breaks decompile code #59

Closed ZornTaov closed 1 year ago

ZornTaov commented 2 years ago

This might be slightly related to #58 as it seems to happen with functions containing gte commands, but a few functions are acting as if the registers gp and sp are used as variables in the decompiled code instead of inferring where global vars are. This causes code like pcVar3 = gp + iVar9 + -0x7794; to be shown instead of pcVar3 = DAT_80134398[iVar9][0]; where DAT_80134398 is a short[4][2]. The gp register has already been set to be 8013bb2c, and that helped everywhere else. The code I'm referencing is at 800d3648 (and there are others as well) in Digimon World 1 SLUS_010.32, Ghidra 10.1.1 with ghidra_psx_ldr v6.3 installed.

lab313ru commented 1 year ago

It's not the plugin bug.