mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 18:53:58 +01:00
Make CBreakpoints an object
This commit is contained in:
1 parent
f692092159
commit
7992ff4627
26 files changed
+252
-258
No files matched your search
@@ -104,7 +104,7 @@ void WebSocketSteppingState::Into(DebuggerRequest &req) {
|
||||
|
||||
if (cpuDebug == currentDebugMIPS) {
|
||||
// If the current PC is on a breakpoint, the user doesn't want to do nothing.
|
||||
CBreakPoints::SetSkipFirst(currentMIPS->pc);
|
||||
g_breakpoints.SetSkipFirst(currentMIPS->pc);
|
||||
|
||||
int c = GetNextInstructionCount(cpuDebug);
|
||||
Core_RequestSingleStep(CPUStepType::Into, c);
|
||||
@@ -115,7 +115,7 @@ void WebSocketSteppingState::Into(DebuggerRequest &req) {
|
||||
// Note: we need to get cpuDebug again anyway (in case we ran some HLE above.)
|
||||
cpuDebug = CPUFromRequest(req);
|
||||
if (cpuDebug != currentDebugMIPS) {
|
||||
CBreakPoints::AddBreakPoint(breakpointAddress, true);
|
||||
g_breakpoints.AddBreakPoint(breakpointAddress, true);
|
||||
AddThreadCondition(breakpointAddress, threadID);
|
||||
Core_Resume();
|
||||
}
|
||||
@@ -168,7 +168,7 @@ void WebSocketSteppingState::Over(DebuggerRequest &req) {
|
||||
// Could have advanced to the breakpoint already in PrepareResume().
|
||||
cpuDebug = CPUFromRequest(req);
|
||||
if (cpuDebug->GetPC() != breakpointAddress) {
|
||||
CBreakPoints::AddBreakPoint(breakpointAddress, true);
|
||||
g_breakpoints.AddBreakPoint(breakpointAddress, true);
|
||||
if (cpuDebug != currentDebugMIPS)
|
||||
AddThreadCondition(breakpointAddress, threadID);
|
||||
Core_Resume();
|
||||
@@ -217,7 +217,7 @@ void WebSocketSteppingState::Out(DebuggerRequest &req) {
|
||||
// Could have advanced to the breakpoint already in PrepareResume().
|
||||
cpuDebug = CPUFromRequest(req);
|
||||
if (cpuDebug->GetPC() != breakpointAddress) {
|
||||
CBreakPoints::AddBreakPoint(breakpointAddress, true);
|
||||
g_breakpoints.AddBreakPoint(breakpointAddress, true);
|
||||
if (cpuDebug != currentDebugMIPS)
|
||||
AddThreadCondition(breakpointAddress, threadID);
|
||||
Core_Resume();
|
||||
@@ -245,7 +245,7 @@ void WebSocketSteppingState::RunUntil(DebuggerRequest &req) {
|
||||
PrepareResume();
|
||||
// We may have arrived already if PauseResume() stepped out of a delay slot.
|
||||
if (currentMIPS->pc != address || wasAtAddress) {
|
||||
CBreakPoints::AddBreakPoint(address, true);
|
||||
g_breakpoints.AddBreakPoint(address, true);
|
||||
Core_Resume();
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@ void WebSocketSteppingState::PrepareResume() {
|
||||
Core_RequestSingleStep(CPUStepType::Into, 1);
|
||||
} else {
|
||||
// If the current PC is on a breakpoint, the user doesn't want to do nothing.
|
||||
CBreakPoints::SetSkipFirst(currentMIPS->pc);
|
||||
g_breakpoints.SetSkipFirst(currentMIPS->pc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,5 +289,5 @@ void WebSocketSteppingState::AddThreadCondition(uint32_t breakpointAddress, uint
|
||||
cond.debug = currentDebugMIPS;
|
||||
cond.expressionString = StringFromFormat("threadid == 0x%08x", threadID);
|
||||
if (currentDebugMIPS->initExpression(cond.expressionString.c_str(), cond.expression))
|
||||
CBreakPoints::ChangeBreakPointAddCond(breakpointAddress, cond);
|
||||
g_breakpoints.ChangeBreakPointAddCond(breakpointAddress, cond);
|
||||
}
|
||||
Reference in new issue
Block a user