Debugger/Logs: Allow to display thread from thread ID on log

This commit is contained in:
Eladash 2023-09-25 18:49:06 +03:00 committed by Elad Ashkenazi
parent e79fc867c5
commit 6dc9e9659d
5 changed files with 48 additions and 6 deletions

View file

@ -1250,6 +1250,29 @@ void debugger_frame::PerformGoToRequest(const QString& text_argument)
}
}
void debugger_frame::PerformGoToThreadRequest(const QString& text_argument)
{
const u64 thread_id = EvaluateExpression(text_argument);
if (thread_id != umax)
{
for (int i = 0; i < m_choice_units->count(); i++)
{
QVariant cpu = m_choice_units->itemData(i);
if (cpu.canConvert<data_type>())
{
if (cpu_thread* ptr = cpu.value<data_type>()(); ptr && ptr->id == thread_id)
{
// Success
m_choice_units->setCurrentIndex(i);
return;
}
}
}
}
}
void debugger_frame::PerformAddBreakpointRequest(u32 addr)
{
m_debugger_list->BreakpointRequested(addr, true);