Merge pull request #14820 from SuperSamus/symbol-search-fix

Debugger: Fix symbol search speed
This commit is contained in:
JMC47
2026-08-19 13:26:47 -04:00
committed by GitHub
2 changed files with 5 additions and 3 deletions
@@ -41,7 +41,8 @@ static const QString BOX_SPLITTER_STYLESHEET = QStringLiteral(
CodeWidget::CodeWidget(QWidget* parent) CodeWidget::CodeWidget(QWidget* parent)
: QDockWidget(parent), m_system(Core::System::GetInstance()), : QDockWidget(parent), m_system(Core::System::GetInstance()),
m_ppc_symbol_db(m_system.GetPPCSymbolDB()) m_ppc_symbol_db(m_system.GetPPCSymbolDB()),
m_show_demangled_names(Settings::Instance().IsShowDemangledNames())
{ {
setWindowTitle(tr("Code")); setWindowTitle(tr("Code"));
setObjectName(QStringLiteral("code")); setObjectName(QStringLiteral("code"));
@@ -253,6 +254,7 @@ void CodeWidget::OnSetCodeAddress(u32 address)
void CodeWidget::OnShowDemangledNamesChanged() void CodeWidget::OnShowDemangledNamesChanged()
{ {
m_show_demangled_names = Settings::Instance().IsShowDemangledNames();
UpdateSymbols(); UpdateSymbols();
if (const Common::Symbol* symbol = m_ppc_symbol_db.GetSymbolFromAddr(m_code_view->GetAddress())) if (const Common::Symbol* symbol = m_ppc_symbol_db.GetSymbolFromAddr(m_code_view->GetAddress()))
{ {
@@ -565,8 +567,7 @@ void CodeWidget::UpdateFunctionCallers(const Common::Symbol* symbol)
// demangled names. // demangled names.
const std::string& CodeWidget::GetSymbolDisplayName(const Common::Symbol* symbol) const const std::string& CodeWidget::GetSymbolDisplayName(const Common::Symbol* symbol) const
{ {
const bool show_demangled_names = Settings::Instance().IsShowDemangledNames(); return symbol->GetDisplayName(m_show_demangled_names);
return symbol->GetDisplayName(show_demangled_names);
} }
void CodeWidget::Step() void CodeWidget::Step()
@@ -81,6 +81,7 @@ private:
Core::System& m_system; Core::System& m_system;
PPCSymbolDB& m_ppc_symbol_db; PPCSymbolDB& m_ppc_symbol_db;
bool m_show_demangled_names;
BranchWatchDialog* m_branch_watch_dialog = nullptr; BranchWatchDialog* m_branch_watch_dialog = nullptr;
QLineEdit* m_search_address; QLineEdit* m_search_address;