From 591159c4a9c6a5c43db03ff09289bfc7875585a5 Mon Sep 17 00:00:00 2001 From: Eladash Date: Fri, 26 Aug 2022 22:23:57 +0300 Subject: [PATCH] Debugger: Prevent possible "current instruction" duplication when the thread is running --- rpcs3/rpcs3qt/debugger_list.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/debugger_list.cpp b/rpcs3/rpcs3qt/debugger_list.cpp index 570857ec29..5e013676fb 100644 --- a/rpcs3/rpcs3qt/debugger_list.cpp +++ b/rpcs3/rpcs3qt/debugger_list.cpp @@ -159,6 +159,7 @@ void debugger_list::ShowAddress(u32 addr, bool select_addr, bool direct) { const bool is_spu = m_cpu->id_type() == 2; const u32 address_limits = (is_spu ? 0x3fffc : ~3); + const u32 current_pc = m_cpu->get_pc(); m_start_addr &= address_limits; u32 pc = m_start_addr; @@ -166,7 +167,7 @@ void debugger_list::ShowAddress(u32 addr, bool select_addr, bool direct) { QListWidgetItem* list_item = item(i); - if (pc == m_cpu->get_pc()) + if (pc == current_pc) { list_item->setForeground(m_text_color_pc); list_item->setBackground(m_color_pc);