From 87f84d4f54ae36afcf218b5f0ee8d563e38cd3e0 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Wed, 28 Sep 2022 21:01:37 -0700 Subject: [PATCH] Debugger/CodeWidget: Update callstack/callers/calls on symbol changes Before, only the symbols box would update. However, if you edit the symbol of a function in the call stack (which seems like something that would happen reasonably often while debugging), the call stack would be out of date until it was updated by clicking on it. Callers and calls were more of an edge case; for them to be out of date, you would need to right-click on an instruction in a function other than the one containing the currently-selected instruction (though it would also affect recursive functions). --- Source/Core/DolphinQt/Debugger/CodeWidget.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp index 252c62b84c..5f2d04afed 100644 --- a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp @@ -176,7 +176,16 @@ void CodeWidget::ConnectWidgets() connect(m_function_callers_list, &QListWidget::itemPressed, this, &CodeWidget::OnSelectFunctionCallers); - connect(m_code_view, &CodeViewWidget::SymbolsChanged, this, &CodeWidget::UpdateSymbols); + connect(m_code_view, &CodeViewWidget::SymbolsChanged, this, [this]() { + UpdateCallstack(); + UpdateSymbols(); + const Common::Symbol* symbol = g_symbolDB.GetSymbolFromAddr(m_code_view->GetAddress()); + if (symbol) + { + UpdateFunctionCalls(symbol); + UpdateFunctionCallers(symbol); + } + }); connect(m_code_view, &CodeViewWidget::BreakpointsChanged, this, [this] { emit BreakpointsChanged(); }); connect(m_code_view, &CodeViewWidget::UpdateCodeWidget, this, &CodeWidget::Update);