summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Vaillancourt <vaillancourtm@gmail.com>2014-04-13 00:59:26 +0200
committerMathieu Vaillancourt <vaillancourtm@gmail.com>2014-04-13 01:04:33 +0200
commit0ecb0365e471c689866e7cbf4d775443e9ac11c7 (patch)
tree09af557096e8158a6669e5d19d814b2b4e060f4c
parentImplement simple LoadSymbols for ELF files (diff)
downloadyuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.tar
yuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.tar.gz
yuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.tar.bz2
yuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.tar.lz
yuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.tar.xz
yuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.tar.zst
yuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.zip
-rw-r--r--src/citra_qt/disasm.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/citra_qt/disasm.cpp b/src/citra_qt/disasm.cpp
index c4f69cac0..5f3a6058a 100644
--- a/src/citra_qt/disasm.cpp
+++ b/src/citra_qt/disasm.cpp
@@ -10,6 +10,7 @@
#include "core/core.h"
#include "common/break_points.h"
+#include "common/symbols.h"
#include "core/arm/interpreter/armdefs.h"
#include "core/arm/disassembler/arm_disasm.h"
@@ -20,7 +21,7 @@ GDisAsmView::GDisAsmView(QWidget* parent, EmuThread& emu_thread) : QDockWidget(p
breakpoints = new BreakPoints();
model = new QStandardItemModel(this);
- model->setColumnCount(2);
+ model->setColumnCount(3);
disasm_ui.treeView->setModel(model);
RegisterHotkey("Disassembler", "Start/Stop", QKeySequence(Qt::Key_F5), Qt::ApplicationShortcut);
@@ -52,6 +53,13 @@ void GDisAsmView::Init()
disasm->disasm(curInstAddr, Memory::Read32(curInstAddr), result);
model->setItem(i, 0, new QStandardItem(QString("0x%1").arg((uint)(curInstAddr), 8, 16, QLatin1Char('0'))));
model->setItem(i, 1, new QStandardItem(QString(result)));
+ if (Symbols::HasSymbol(curInstAddr))
+ {
+ TSymbol symbol = Symbols::GetSymbol(curInstAddr);
+ model->setItem(i, 2, new QStandardItem(QString("%1 - Size:%2").arg(QString::fromStdString(symbol.name))
+ .arg(symbol.size / 4))); // divide by 4 to get instruction count
+
+ }
curInstAddr += 4;
}
disasm_ui.treeView->resizeColumnToContents(0);