diff --git a/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp b/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp index 64785976d3..cdf146bb74 100644 --- a/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp +++ b/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp @@ -779,7 +779,7 @@ void CtrlDisassemblyView::onPopupClick(wxCommandEvent& evt) break; } case ID_DISASM_ASSEMBLE: - assembleOpcode(curAddress,""); + assembleOpcode(curAddress, disassembleCurAddress()); break; default: wxMessageBox( L"Unimplemented.", L"Unimplemented.", wxICON_INFORMATION); @@ -1206,6 +1206,13 @@ std::string CtrlDisassemblyView::disassembleRange(u32 start, u32 size) return result; } +std::string CtrlDisassemblyView::disassembleCurAddress() +{ + DisassemblyLineInfo line = DisassemblyLineInfo(); + manager.getLine(curAddress, displaySymbols, line); + return line.name + (line.params.length() > 0 ? " " + line.params : ""); +} + void CtrlDisassemblyView::copyInstructions(u32 startAddr, u32 endAddr, bool withDisasm) { if (!wxTheClipboard->Open()) diff --git a/pcsx2/gui/Debugger/CtrlDisassemblyView.h b/pcsx2/gui/Debugger/CtrlDisassemblyView.h index dd78d91065..1a99c90032 100644 --- a/pcsx2/gui/Debugger/CtrlDisassemblyView.h +++ b/pcsx2/gui/Debugger/CtrlDisassemblyView.h @@ -61,6 +61,7 @@ private: void toggleBreakpoint(bool toggleEnabled); void updateStatusBarText(); std::string disassembleRange(u32 start, u32 size); + std::string disassembleCurAddress(); void copyInstructions(u32 startAddr, u32 endAddr, bool withDisasm); void disassembleToFile(); void editBreakpoint();