MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / onStepOut

Method onStepOut

pcsx2-qt/Debugger/DebuggerWindow.cpp:506–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504}
505
506void DebuggerWindow::onStepOut()
507{
508 DebugInterface* cpu = currentCPU();
509 if (!cpu)
510 return;
511
512 if (!cpu->isAlive() || !cpu->isCpuPaused())
513 return;
514
515 // Allow the cpu to skip this pc if it is a breakpoint
516 CBreakPoints::SetSkipFirst(cpu->getCpuType(), cpu->getPC());
517
518 std::vector<MipsStackWalk::StackFrame> stack_frames;
519 for (const auto& thread : cpu->GetThreadList())
520 {
521 if (thread->Status() == ThreadStatus::THS_RUN)
522 {
523 stack_frames = MipsStackWalk::Walk(
524 cpu,
525 cpu->getPC(),
526 cpu->getRegister(0, 31),
527 cpu->getRegister(0, 29),
528 thread->EntryPoint());
529 break;
530 }
531 }
532
533 if (stack_frames.size() < 2)
534 return;
535
536 u32 breakpoint_pc = stack_frames.at(1).pc;
537
538 Host::RunOnCPUThread([cpu, breakpoint_pc] {
539 CBreakPoints::AddBreakPoint(cpu->getCpuType(), breakpoint_pc, true, true, true);
540 cpu->resumeCpu();
541 });
542
543 update();
544}
545
546void DebuggerWindow::changeEvent(QEvent* event)
547{

Callers

nothing calls this directly

Calls 13

WalkFunction · 0.85
isAliveMethod · 0.80
isCpuPausedMethod · 0.80
getCpuTypeMethod · 0.80
getPCMethod · 0.80
GetThreadListMethod · 0.80
getRegisterMethod · 0.80
atMethod · 0.80
resumeCpuMethod · 0.80
updateFunction · 0.50
StatusMethod · 0.45
EntryPointMethod · 0.45

Tested by

no test coverage detected