From 8d1e294b32df600d6252e75dd2e5eb132df9cb83 Mon Sep 17 00:00:00 2001 From: Kingcom Date: Tue, 29 Jul 2014 21:06:24 +0200 Subject: [PATCH] Also highlight registers accessed by memory opcodes --- pcsx2/gui/Debugger/CtrlDisassemblyView.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp b/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp index e0ff4c6dcf..8ee13d1e69 100644 --- a/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp +++ b/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp @@ -77,7 +77,7 @@ inline wxIcon _wxGetIconFromMemory(const unsigned char *data, int length) { } CtrlDisassemblyView::CtrlDisassemblyView(wxWindow* parent, DebugInterface* _cpu) - : wxWindow(parent,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxWANTS_CHARS||wxBORDER_SIMPLE|wxVSCROLL), cpu(_cpu) + : wxWindow(parent,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxWANTS_CHARS|wxBORDER_SIMPLE|wxVSCROLL), cpu(_cpu) { manager.setCpu(cpu); windowStart = 0x100000; @@ -326,9 +326,18 @@ std::set CtrlDisassemblyView::getSelectedLineArguments() { p = nextp + 1; nextp = line.params.find(',', p); } + if (p < line.params.size()) { args.insert(line.params.substr(p)); } + + // check for registers in memory opcodes + p = line.params.find('('); + nextp = line.params.find(')'); + if (p != line.params.npos && nextp != line.params.npos && nextp > p) { + args.insert(line.params.substr(p+1, nextp - p - 1)); + } + } return args;