More Debug features? - Printable Version +- EmuNewz Network (https://www.emunewz.net/forum) +-- Forum: PSP Emulation (https://www.emunewz.net/forum/forumdisplay.php?fid=191) +--- Forum: JPCSP Official Forum (https://www.emunewz.net/forum/forumdisplay.php?fid=51) +---- Forum: svn trunk discussion (https://www.emunewz.net/forum/forumdisplay.php?fid=56) +---- Thread: More Debug features? (/showthread.php?tid=4391) |
More Debug features? - Zarradeth - 04-29-2011 As someone who is looking to use this emulator for hacking (for a game translation), I was wondering what the plans for debug features were? I know that, looking at changelogs, there was tracing at one point, as well as Read/Write breakpoints- but they seem to have been removed since they were added. And I must say, at least Read/Write breakpoints would be an immense help to me- and I'm sure to many others in the future. Any possibility that it might be simple to at least re-implement the memory debugging? (I see the source is still there, though, afaict, it doesn't work) And maybe add a dialog for ssettings/editing memory breakpoints in the memory viewer? RE: More Debug features? - gid15 - 04-29-2011 (04-29-2011, 08:04 AM)Zarradeth Wrote: As someone who is looking to use this emulator for hacking (for a game translation), I was wondering what the plans for debug features were?The DebuggerMemory is automatically used when a file named "Memory.mbrk" is present in the main directory. The format of the file is quite simple: Code: R 0xXXXXXXXX The last line is to enable traces of the corresponding reads and writes. RE: More Debug features? - Zarradeth - 04-30-2011 Thanks for the help, it's much appreciated. I have updated my Memory.mbrk file going by what you have said to- Code: W 0x88941200 And I know that my compiled Memory.class file sets useDebuggerMemory to true (it's disabled by default in the svn), but the emulator still isn't breaking on writes to that memory location. I could honestly live without tracing, but breaking on memory read/writes would help me astronomical amounts. RE: More Debug features? - gid15 - 04-30-2011 (04-30-2011, 08:16 AM)Zarradeth Wrote: Thanks for the help, it's much appreciated. Sorry, I forgot one additional option "pause": Code: read|write|read8|write8|read16|write16|read32|write32|pause You don't need the readX|writeX options if you are not interested in tracing all the memory reads & writes. E.g., for just a write breakpoint: Code: pause Also, open the Debugger window before pressing the "Run" button to have full debugger functionality (the compiler is removing debugger calls when the debugger window is closed). BTW, you don't have to modify Memory.java, when the file is present, the debugger memory is activated: Code: if (useDebuggerMemory || new File(DebuggerMemory.mBrkFilePath).exists()) { RE: More Debug features? - Zarradeth - 04-30-2011 Okay, I tried adding the pause and I still get nothing, I setup the logger to run at info level, don't get anything in the logs. I tried setting a write breakpoint on about a 20h range around the value, nothing. I tried using a value that is modified by the game much more often, still nothing. The only time I can get the emulator to break or log anything is when I setup it up with a break on reading, and I use the memory viewer to view the address. The breakpoint will trigger when I press 'go to address' (to update the viewer), but not when the game reads/writes to the values. I tried using exactly what you gave me: Code: pause Edit: I take back what I said, it's working- I've used other values (0x09FFFDF0) that I know the game modifies early on and it's triggering the breakpoint for it- I don't know why the later values (in RAM) aren't getting triggered. Edit 2: I got it working, after looking up some memory mappings/partitions I realized that I was breaking on kernel memory, which the game shouldn't be writing to itself. The game was actually writing to 0x08941200. Thanks for the help though, there wasn't much/any information lying around explaining the format for the Memory.mbrk files, so this was still helpful, and hopefully someone in the future might find this information helpful. RE: More Debug features? - gid15 - 05-04-2011 (04-30-2011, 12:51 PM)Zarradeth Wrote: Edit: I take back what I said, it's working- I've used other values (0x09FFFDF0) that I know the game modifies early on and it's triggering the breakpoint for it- I don't know why the later values (in RAM) aren't getting triggered.I've fixed this in r2109 and also in other situations were the breakpoints were not always recognized. Thanks for the feedback! |