mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Same with Step Out
This commit is contained in:
1 parent
251fc8d905
commit
69177f7fa6
2 files changed
+31
-27
No files matched your search
@@ -246,36 +246,12 @@ void CDisasm::stepOut() {
|
||||
if (!PSP_IsInited())
|
||||
return;
|
||||
|
||||
|
||||
u32 entry = cpu->GetPC();
|
||||
u32 stackTop = 0;
|
||||
|
||||
auto threads = GetThreadsInfo();
|
||||
for (size_t i = 0; i < threads.size(); i++) {
|
||||
if (threads[i].isCurrent) {
|
||||
entry = threads[i].entrypoint;
|
||||
stackTop = threads[i].initialStack;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
auto frames = MIPSStackWalk::Walk(cpu->GetPC(), cpu->GetRegValue(0,31), cpu->GetRegValue(0,29), entry, stackTop);
|
||||
if (frames.size() < 2) {
|
||||
// Failure
|
||||
return;
|
||||
}
|
||||
|
||||
u32 breakpointAddress = frames[1].pc;
|
||||
lastTicks_ = CoreTiming::GetTicks();
|
||||
|
||||
// If the current PC is on a breakpoint, the user doesn't want to do nothing.
|
||||
CBreakPoints::SetSkipFirst(currentMIPS->pc);
|
||||
|
||||
CtrlDisAsmView *ptr = DisAsmView();
|
||||
ptr->setDontRedraw(true);
|
||||
lastTicks_ = CoreTiming::GetTicks();
|
||||
|
||||
u32 breakpointAddress = Core_PerformStep(cpu, CPUStepType::Out, 0);
|
||||
|
||||
CBreakPoints::AddBreakPoint(breakpointAddress,true);
|
||||
Core_Resume();
|
||||
Sleep(1);
|
||||
ptr->gotoAddr(breakpointAddress);
|
||||
UpdateDialog();
|
||||
|
||||
Reference in new issue
Block a user