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
This commit is contained in:
parent
e168f95257
commit
f4cae8c9b7
|
@ -18,6 +18,7 @@
|
||||||
#include "Debugger.h"
|
#include "Debugger.h"
|
||||||
#include "Debugger/PPCDebugInterface.h"
|
#include "Debugger/PPCDebugInterface.h"
|
||||||
#include "PowerPC/SymbolDB.h"
|
#include "PowerPC/SymbolDB.h"
|
||||||
|
#include "HW/Memmap.h" // for Write_U32
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "StringUtil.h"
|
#include "StringUtil.h"
|
||||||
|
|
||||||
|
@ -238,9 +239,33 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||||
redraw();
|
redraw();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Insert blr or restore old value
|
||||||
case IDM_INSERTBLR:
|
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;
|
break;
|
||||||
|
|
||||||
case IDM_JITRESULTS:
|
case IDM_JITRESULTS:
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "Debugger/DebugInterface.h"
|
#include "Debugger/DebugInterface.h"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
|
|
||||||
DECLARE_EVENT_TYPE(wxEVT_CODEVIEW_CHANGE, -1);
|
DECLARE_EVENT_TYPE(wxEVT_CODEVIEW_CHANGE, -1);
|
||||||
|
@ -42,6 +43,13 @@ class CCodeView
|
||||||
|
|
||||||
u32 GetSelection() {return(selection);}
|
u32 GetSelection() {return(selection);}
|
||||||
|
|
||||||
|
struct BlrStruct // for IDM_INSERTBLR
|
||||||
|
{
|
||||||
|
u32 Address;
|
||||||
|
u32 OldValue;
|
||||||
|
};
|
||||||
|
std::vector<BlrStruct> BlrList;
|
||||||
|
|
||||||
void Center(u32 addr)
|
void Center(u32 addr)
|
||||||
{
|
{
|
||||||
curAddress = addr;
|
curAddress = addr;
|
||||||
|
|
Loading…
Reference in New Issue