diff options
| author | 2014-04-12 18:59:26 -0400 | |
|---|---|---|
| committer | 2014-04-12 19:04:33 -0400 | |
| commit | 0ecb0365e471c689866e7cbf4d775443e9ac11c7 (patch) | |
| tree | 09af557096e8158a6669e5d19d814b2b4e060f4c /src | |
| parent | Implement simple LoadSymbols for ELF files (diff) | |
| download | yuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.tar.gz yuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.tar.xz yuzu-0ecb0365e471c689866e7cbf4d775443e9ac11c7.zip | |
Show symbols in disasm
Diffstat (limited to '')
| -rw-r--r-- | src/citra_qt/disasm.cpp | 10 |
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 @@ | |||
| 10 | 10 | ||
| 11 | #include "core/core.h" | 11 | #include "core/core.h" |
| 12 | #include "common/break_points.h" | 12 | #include "common/break_points.h" |
| 13 | #include "common/symbols.h" | ||
| 13 | #include "core/arm/interpreter/armdefs.h" | 14 | #include "core/arm/interpreter/armdefs.h" |
| 14 | #include "core/arm/disassembler/arm_disasm.h" | 15 | #include "core/arm/disassembler/arm_disasm.h" |
| 15 | 16 | ||
| @@ -20,7 +21,7 @@ GDisAsmView::GDisAsmView(QWidget* parent, EmuThread& emu_thread) : QDockWidget(p | |||
| 20 | breakpoints = new BreakPoints(); | 21 | breakpoints = new BreakPoints(); |
| 21 | 22 | ||
| 22 | model = new QStandardItemModel(this); | 23 | model = new QStandardItemModel(this); |
| 23 | model->setColumnCount(2); | 24 | model->setColumnCount(3); |
| 24 | disasm_ui.treeView->setModel(model); | 25 | disasm_ui.treeView->setModel(model); |
| 25 | 26 | ||
| 26 | RegisterHotkey("Disassembler", "Start/Stop", QKeySequence(Qt::Key_F5), Qt::ApplicationShortcut); | 27 | RegisterHotkey("Disassembler", "Start/Stop", QKeySequence(Qt::Key_F5), Qt::ApplicationShortcut); |
| @@ -52,6 +53,13 @@ void GDisAsmView::Init() | |||
| 52 | disasm->disasm(curInstAddr, Memory::Read32(curInstAddr), result); | 53 | disasm->disasm(curInstAddr, Memory::Read32(curInstAddr), result); |
| 53 | model->setItem(i, 0, new QStandardItem(QString("0x%1").arg((uint)(curInstAddr), 8, 16, QLatin1Char('0')))); | 54 | model->setItem(i, 0, new QStandardItem(QString("0x%1").arg((uint)(curInstAddr), 8, 16, QLatin1Char('0')))); |
| 54 | model->setItem(i, 1, new QStandardItem(QString(result))); | 55 | model->setItem(i, 1, new QStandardItem(QString(result))); |
| 56 | if (Symbols::HasSymbol(curInstAddr)) | ||
| 57 | { | ||
| 58 | TSymbol symbol = Symbols::GetSymbol(curInstAddr); | ||
| 59 | model->setItem(i, 2, new QStandardItem(QString("%1 - Size:%2").arg(QString::fromStdString(symbol.name)) | ||
| 60 | .arg(symbol.size / 4))); // divide by 4 to get instruction count | ||
| 61 | |||
| 62 | } | ||
| 55 | curInstAddr += 4; | 63 | curInstAddr += 4; |
| 56 | } | 64 | } |
| 57 | disasm_ui.treeView->resizeColumnToContents(0); | 65 | disasm_ui.treeView->resizeColumnToContents(0); |