![]() |
|
Memory breakpoints don't break on correct PC? - Printable Version +- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org) +-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support) +--- Forum: Support (https://forums.dolphin-emu.org/Forum-support) +--- Thread: Memory breakpoints don't break on correct PC? (/Thread-memory-breakpoints-don-t-break-on-correct-pc) |
Memory breakpoints don't break on correct PC? - BLJRacer - 03-11-2010 Hi. I'm new to Dolphin and I don't know much PPC ASM. I don't know if this post belongs to this category (please move it if it doesn't). Basically, I've found an interesting memory address in a game. I would like to read the code that uses the value on this zone, so I've compiled the DebugFast version of Dolphin (SVN R 5173M), set up the memory breakpoints, and switched the CPU to interpreter mode. The game stops when the value changes, but it doesn't seem to break where the value changes. If I look at the value, it has already changed, and the previous instructions don't look like they're modifying that value. Is that the expected behaviour? Am I missing something? RE: Memory breakpoints don't break on correct PC? - skid - 03-11-2010 Yeh, there is a bit of a design fault with the memory breakpoints in Dolphin. What I've done is to hack the code to log the PC as the WriteToHardware function is called. RE: Memory breakpoints don't break on correct PC? - BLJRacer - 03-12-2010 Thanks a lot, at least it works now. If someone's having the same problem, here's what I did: On the functions that check for breakpoints (look for WriteToHardware calls), add inside the "if (mc)" block: Code: DEBUG_LOG(MEMMAP, "Write_U8 to %.8X from PC %.8X (Data=%u)", _Address, PC, _Data);Obviously changing the function name, and for the 64-bit write, the %u to a %llu (not tested!) Then, enable memmap logging on the log window, and it'll show you the information about the operation so you can set a BP. RE: Memory breakpoints don't break on correct PC? - BLJRacer - 03-12-2010 Found a simpler way, just edit the first funcion of Breakpoints.cpp (TMemCheck::Action) to add the PC to the debug line. |