diff options
| author | OatmealDome <OatmealDome@users.noreply.github.com> | 2024-12-07 17:13:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-07 17:13:13 -0500 |
| commit | 57b1234feb01ad5bbe7bdbf2bffd2a14590e560e (patch) | |
| tree | d5cc1299c356e534d6ef1dd10937f343f171938b /Source/Core/DolphinQt/Debugger/CodeWidget.cpp | |
| parent | 0a84d93a8e64d946405b0e17edd1a29ccfac0606 (diff) | |
| parent | 1c4bfc35d980856033714a84a8425e71576623eb (diff) | |
Merge pull request #13113 from CelestialAmber/mwld-map
Core: Store object name separately for symbols
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/CodeWidget.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp index c36f8c31d7..af8315f179 100644 --- a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp @@ -379,6 +379,12 @@ void CodeWidget::UpdateSymbols() { QString name = QString::fromStdString(symbol.second.name); + // If the symbol has an object name, add it to the entry name. + if (!symbol.second.object_name.empty()) + { + name += QString::fromStdString(fmt::format(" ({})", symbol.second.object_name)); + } + auto* item = new QListWidgetItem(name); if (name == selection) item->setSelected(true); @@ -408,8 +414,17 @@ void CodeWidget::UpdateFunctionCalls(const Common::Symbol* symbol) if (call_symbol) { - const QString name = - QString::fromStdString(fmt::format("> {} ({:08x})", call_symbol->name, addr)); + QString name; + + if (!call_symbol->object_name.empty()) + { + name = QString::fromStdString( + fmt::format("< {} ({}, {:08x})", call_symbol->name, call_symbol->object_name, addr)); + } + else + { + name = QString::fromStdString(fmt::format("< {} ({:08x})", call_symbol->name, addr)); + } if (!name.contains(filter, Qt::CaseInsensitive)) continue; @@ -433,8 +448,17 @@ void CodeWidget::UpdateFunctionCallers(const Common::Symbol* symbol) if (caller_symbol) { - const QString name = - QString::fromStdString(fmt::format("< {} ({:08x})", caller_symbol->name, addr)); + QString name; + + if (!caller_symbol->object_name.empty()) + { + name = QString::fromStdString(fmt::format("< {} ({}, {:08x})", caller_symbol->name, + caller_symbol->object_name, addr)); + } + else + { + name = QString::fromStdString(fmt::format("< {} ({:08x})", caller_symbol->name, addr)); + } if (!name.contains(filter, Qt::CaseInsensitive)) continue; |
