From e12276674bbbd9bb194b1e4b8f09c65c6d70cb1e Mon Sep 17 00:00:00 2001 From: Xusheng Date: Wed, 29 Mar 2023 10:11:12 +0800 Subject: [PATCH] Fix the debugger UI not navigating to the current address when a breakpoint is hit in a shared library --- ui/ui.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/ui.cpp b/ui/ui.cpp index 5f518abb..cb0ea678 100644 --- a/ui/ui.cpp +++ b/ui/ui.cpp @@ -922,9 +922,11 @@ void DebuggerUI::navigateDebugger(uint64_t address) for (auto i : syncGroup->members()) { View* groupView = i->getCurrentViewInterface(); - if (groupView->getCurrentFunction()) + auto data = groupView->getData(); + bool dataMatch = (data && (data == m_controller->GetLiveView() || data == m_controller->GetData())); + if (dataMatch && groupView->getCurrentFunction()) { - navigated = i->navigate(m_controller->GetLiveView(), address, true, true); + navigated |= i->navigate(m_controller->GetLiveView(), address, true, true); if (navigated) break; } @@ -1089,7 +1091,6 @@ void DebuggerUI::updateUI(const DebuggerEvent& event) FileContext* fileContext = frame->getFileContext(); fileContext->refreshDataViewCache(); ViewFrame* newFrame = m_context->openFileContext(fileContext); - QCoreApplication::processEvents(); if (newFrame) {