Emulator Issues #13044
Debugger: CheckBreakPoints is hit twice per breakpoint.
What's the problem? Describe what went wrong.
PowerPC::CheckBreakPoints in Jit.cpp and JitAsm.cpp are both hit on a breakpoint. This produces two log outputs per one hit. Also, working on future stuff and having it hit twice is not good. This is for code breakpoints.
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
Yes, it seems to have been around for quite awhile.
I removed the one from JitAsm and it didn't cause any issues for me, but I don't really know if this is the correct fix. The call doesn't return anything, so I don't think it's needed for more than triggering a breakpoint report. So my other question is: Are both jit and jitasm debug sections always hit together? Is this platform dependent?
- Assignee set to JosJuice
- Status changed from New to Accepted
I think the reason why this wasn't noticed before is that if you enable breaking on the breakpoint (which I imagine is the most common), Dolphin will break after the JitAsm.cpp check and thus not run the Jit.cpp check.
The intent seems to be that the JitAsm.cpp check runs between blocks and the Jit.cpp check runs in the middle of blocks, but if you place a breakpoint at the beginning of a block, you end up triggering both.
Thanks for looking at this so quickly. The changes actually break a lot of debugging stuff. Step Over goes wacky. Breakpoints stop the game on wrong addresses, etc. I think the jitasm debugging stuff is necessary for things to function properly.
I went back and looked at my test-removal of this from jitasm:
It appeared to work, but now I see it no longer puts our a log message when it breaks on a breakpoints, as jitasm prevents the jit hit on break like you said.
So we have generally working behavior when breaking/pausing on a breakpoint and broken duplication when logging, but not pausing for, the breakpoint. The duplicates on log-only may seem like a minor issue, but are causing bigger issues on future work.
I made a mistake. I thought setting a code breakpoint in the code tab would flag it for being logged, but it doesn't. I re-ran my previous test with
removed from jitasm and manually setting break and log. Everything looks to be working correctly. This could be a potential fix.