diff options
| author | John Peterson <jpeterson57@gmail.com> | 2008-11-29 08:38:03 +0000 |
|---|---|---|
| committer | John Peterson <jpeterson57@gmail.com> | 2008-11-29 08:38:03 +0000 |
| commit | f4cae8c9b7f3a71b1ae5c691d5bdb9a038b12f3d (patch) | |
| tree | efc28698c91749019256f17c21e94073e390ea22 /Source/Core/DebuggerWX/Src/CodeView.cpp | |
| parent | e168f95257d617dfc5135831de0f4d117f0fbabf (diff) | |
Debugger: Made Insert blr toggle between blr and old value
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1326 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX/Src/CodeView.cpp')
| -rw-r--r-- | Source/Core/DebuggerWX/Src/CodeView.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/Source/Core/DebuggerWX/Src/CodeView.cpp b/Source/Core/DebuggerWX/Src/CodeView.cpp index c7bafae1e1..79cbd1be7d 100644 --- a/Source/Core/DebuggerWX/Src/CodeView.cpp +++ b/Source/Core/DebuggerWX/Src/CodeView.cpp @@ -18,6 +18,7 @@ #include "Debugger.h"
#include "Debugger/PPCDebugInterface.h"
#include "PowerPC/SymbolDB.h"
+#include "HW/Memmap.h" // for Write_U32
#include "Common.h"
#include "StringUtil.h"
@@ -238,9 +239,33 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) redraw();
break;
+ // Insert blr or restore old value
case IDM_INSERTBLR:
- debugger->insertBLR(selection);
- redraw();
+ {
+ // Check if this address has been modified
+ int find = -1;
+ for(int i = 0; i < BlrList.size(); i++)
+ {
+ if(BlrList.at(i).Address == selection)
+ { find = i; break; }
+ }
+
+ // Save the old value
+ if(find >= 0)
+ {
+ Memory::Write_U32(BlrList.at(find).OldValue, selection);
+ BlrList.erase(BlrList.begin() + find);
+ }
+ else
+ {
+ BlrStruct Temp;
+ Temp.Address = selection;
+ Temp.OldValue = debugger->readMemory(selection);
+ BlrList.push_back(Temp);
+ debugger->insertBLR(selection);
+ }
+ redraw();
+ }
break;
case IDM_JITRESULTS:
|
