mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-12-03 19:33:33 +01:00
Debugger: Backtrace current context if no thread
Backtrace the current context if no running thread is found in the threadlist.
This commit is contained in:
1 parent
1f67c53b67
commit
2d252d4d01
3 files changed
+35
-18
No files matched your search
@@ -107,14 +107,21 @@ void StackModel::refreshData()
|
||||
// Hopefully in the near future we can get a stack frame for
|
||||
// each thread
|
||||
beginResetModel();
|
||||
for (const auto& thread : m_cpu.GetThreadList())
|
||||
|
||||
std::unique_ptr<BiosThread> found_thread = nullptr;
|
||||
|
||||
for (auto& thread : m_cpu.GetThreadList())
|
||||
{
|
||||
if (thread->Status() == ThreadStatus::THS_RUN)
|
||||
{
|
||||
m_stackFrames = m_cpu.StackTrace(*thread);
|
||||
found_thread = std::move(thread);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Will do best effort with current context if found_thread is nullptr.
|
||||
m_stackFrames = m_cpu.StackTrace(found_thread.get());
|
||||
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user