Debugger: correctness fixes and cleanup

* Remove m_current_choice, it's not correct to rely on thread name entry. In extreme corner cases a newly thread can be created, old destroyed with the same entry name. (reoccuring LV2 SPU/PPU ID)
* Remove m_no_thread_selected, can be easily replaced with std::weak_ptr expired() function and is more accurate this way.
* In HandleBreakpointRequest: only remove breakpoint on valid PPU thread and not any thread! also fix potential nullptr deref if thread has recently been destroyed.
This commit is contained in:
Eladash 2020-12-16 16:44:41 +02:00 committed by Ivan
parent ef884642e4
commit 2c06043617
5 changed files with 23 additions and 21 deletions

View file

@ -149,7 +149,7 @@ void debugger_list::keyPressEvent(QKeyEvent* event)
void debugger_list::mouseDoubleClickEvent(QMouseEvent* event)
{
if (event->button() == Qt::LeftButton && !Emu.IsStopped() && !m_no_thread_selected)
if (event->button() == Qt::LeftButton)
{
int i = currentRow();
if (i < 0) return;