diff options
Diffstat (limited to 'src/citra_qt/debugger')
| -rw-r--r-- | src/citra_qt/debugger/callstack.cpp | 2 | ||||
| -rw-r--r-- | src/citra_qt/debugger/disassembler.cpp | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp index f59f2d8c8..77fb0c9ed 100644 --- a/src/citra_qt/debugger/callstack.cpp +++ b/src/citra_qt/debugger/callstack.cpp | |||
| @@ -37,7 +37,7 @@ void CallstackWidget::OnCPUStepped() | |||
| 37 | 37 | ||
| 38 | /* TODO (mattvail) clean me, move to debugger interface */ | 38 | /* TODO (mattvail) clean me, move to debugger interface */ |
| 39 | u32 insn = Memory::Read32(call_addr); | 39 | u32 insn = Memory::Read32(call_addr); |
| 40 | if (disasm->decode(insn) == OP_BL) | 40 | if (disasm->Decode(insn) == OP_BL) |
| 41 | { | 41 | { |
| 42 | std::string name; | 42 | std::string name; |
| 43 | // ripped from disasm | 43 | // ripped from disasm |
diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index 507a35718..856baf63d 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp | |||
| @@ -36,22 +36,20 @@ QVariant DisassemblerModel::data(const QModelIndex& index, int role) const { | |||
| 36 | switch (role) { | 36 | switch (role) { |
| 37 | case Qt::DisplayRole: | 37 | case Qt::DisplayRole: |
| 38 | { | 38 | { |
| 39 | static char result[255]; | ||
| 40 | |||
| 41 | u32 address = base_address + index.row() * 4; | 39 | u32 address = base_address + index.row() * 4; |
| 42 | u32 instr = Memory::Read32(address); | 40 | u32 instr = Memory::Read32(address); |
| 43 | ARM_Disasm::disasm(address, instr, result); | 41 | std::string disassembly = ARM_Disasm::Disassemble(address, instr); |
| 44 | 42 | ||
| 45 | if (index.column() == 0) { | 43 | if (index.column() == 0) { |
| 46 | return QString("0x%1").arg((uint)(address), 8, 16, QLatin1Char('0')); | 44 | return QString("0x%1").arg((uint)(address), 8, 16, QLatin1Char('0')); |
| 47 | } else if (index.column() == 1) { | 45 | } else if (index.column() == 1) { |
| 48 | return QString::fromLatin1(result); | 46 | return QString::fromStdString(disassembly); |
| 49 | } else if (index.column() == 2) { | 47 | } else if (index.column() == 2) { |
| 50 | if(Symbols::HasSymbol(address)) { | 48 | if(Symbols::HasSymbol(address)) { |
| 51 | TSymbol symbol = Symbols::GetSymbol(address); | 49 | TSymbol symbol = Symbols::GetSymbol(address); |
| 52 | return QString("%1 - Size:%2").arg(QString::fromStdString(symbol.name)) | 50 | return QString("%1 - Size:%2").arg(QString::fromStdString(symbol.name)) |
| 53 | .arg(symbol.size / 4); // divide by 4 to get instruction count | 51 | .arg(symbol.size / 4); // divide by 4 to get instruction count |
| 54 | } else if (ARM_Disasm::decode(instr) == OP_BL) { | 52 | } else if (ARM_Disasm::Decode(instr) == OP_BL) { |
| 55 | u32 offset = instr & 0xFFFFFF; | 53 | u32 offset = instr & 0xFFFFFF; |
| 56 | 54 | ||
| 57 | // Sign-extend the 24-bit offset | 55 | // Sign-extend the 24-bit offset |