mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Cleanup the breakpoint code a bit, fix updating the breakpoint window when clicking in the bp column in the code view.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1607 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
|
||||
#include "BreakPointDlg.h"
|
||||
#include "Common.h"
|
||||
#include "Host.h"
|
||||
#include "Debugger.h"
|
||||
#include "StringUtil.h"
|
||||
#include "Debugger/Debugger_BreakPoints.h"
|
||||
@ -76,8 +77,8 @@ void BreakPointDlg::OnOK(wxCommandEvent& /*event*/)
|
||||
u32 Address = 0;
|
||||
if (AsciiToHex(AddressString.mb_str(), Address))
|
||||
{
|
||||
CBreakPoints::AddBreakPoint(Address);
|
||||
CBreakPoints::UpdateBreakPointView();
|
||||
BreakPoints::Add(Address);
|
||||
Host_UpdateBreakPointView();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ void CBreakPointView::Update()
|
||||
InsertColumn(4, wxT("Flags"), wxLIST_FORMAT_CENTER, 100);
|
||||
|
||||
char szBuffer[64];
|
||||
const CBreakPoints::TBreakPoints& rBreakPoints = CBreakPoints::GetBreakPoints();
|
||||
const BreakPoints::TBreakPoints& rBreakPoints = BreakPoints::GetBreakPoints();
|
||||
for (size_t i = 0; i < rBreakPoints.size(); i++)
|
||||
{
|
||||
const TBreakPoint& rBP = rBreakPoints[i];
|
||||
@ -74,7 +74,7 @@ void CBreakPointView::Update()
|
||||
}
|
||||
}
|
||||
|
||||
const CBreakPoints::TMemChecks& rMemChecks = CBreakPoints::GetMemChecks();
|
||||
const MemChecks::TMemChecks& rMemChecks = MemChecks::GetMemChecks();
|
||||
for (size_t i = 0; i < rMemChecks.size(); i++)
|
||||
{
|
||||
const TMemCheck& rMemCheck = rMemChecks[i];
|
||||
@ -106,7 +106,6 @@ void CBreakPointView::Update()
|
||||
SetItemData(Item, rMemCheck.StartAddress);
|
||||
}
|
||||
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
||||
@ -116,6 +115,8 @@ void CBreakPointView::DeleteCurrentSelection()
|
||||
if (Item >= 0)
|
||||
{
|
||||
u32 Address = (u32)GetItemData(Item);
|
||||
CBreakPoints::DeleteElementByAddress(Address);
|
||||
BreakPoints::DeleteByAddress(Address);
|
||||
MemChecks::DeleteByAddress(Address);
|
||||
Update();
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "HW/Memmap.h"
|
||||
#include "BreakPointDlg.h"
|
||||
#include "MemoryCheckDlg.h"
|
||||
#include "Host.h"
|
||||
#include "IniFile.h"
|
||||
#include "Debugger/Debugger_BreakPoints.h" // for TMemCheck
|
||||
|
||||
@ -205,7 +206,7 @@ CBreakPointWindow::OnDelete(wxCommandEvent& event)
|
||||
void
|
||||
CBreakPointWindow::OnClear(wxCommandEvent& event)
|
||||
{
|
||||
CBreakPoints::ClearAllBreakPoints();
|
||||
BreakPoints::Clear();
|
||||
}
|
||||
// ============
|
||||
|
||||
@ -244,11 +245,11 @@ CBreakPointWindow::OnAddBreakPointMany(wxCommandEvent& event)
|
||||
u32 Address = 0;
|
||||
if (AsciiToHex(line.c_str(), Address))
|
||||
{
|
||||
CBreakPoints::AddBreakPoint(Address);
|
||||
BreakPoints::Add(Address);
|
||||
}
|
||||
}
|
||||
// only update after we are done with the loop
|
||||
CBreakPoints::UpdateBreakPointView();
|
||||
Host_UpdateBreakPointView();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -338,7 +339,7 @@ CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event)
|
||||
MemCheck.Break = true;
|
||||
}
|
||||
|
||||
if(doCommon)
|
||||
if (doCommon)
|
||||
{
|
||||
// settings for the memory check
|
||||
MemCheck.OnRead = true;
|
||||
@ -346,11 +347,11 @@ CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event)
|
||||
MemCheck.Log = true;
|
||||
//MemCheck.Break = false; // this is also what sets Active "on" in the breakpoint window
|
||||
// so don't think it's off because we are only writing this to the log
|
||||
CBreakPoints::AddMemoryCheck(MemCheck);
|
||||
MemChecks::Add(MemCheck);
|
||||
}
|
||||
}
|
||||
// update after we are done with the loop
|
||||
CBreakPoints::UpdateBreakPointView();
|
||||
Host_UpdateBreakPointView();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -119,6 +119,7 @@ void CCodeView::OnMouseDown(wxMouseEvent& event)
|
||||
{
|
||||
debugger->toggleBreakpoint(YToAddress(y));
|
||||
redraw();
|
||||
Host_UpdateBreakPointView();
|
||||
}
|
||||
|
||||
event.Skip(true);
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "Common.h"
|
||||
#include "Debugger.h"
|
||||
#include "StringUtil.h"
|
||||
#include "Host.h"
|
||||
#include "Debugger/Debugger_BreakPoints.h"
|
||||
|
||||
BEGIN_EVENT_TABLE(MemoryCheckDlg,wxDialog)
|
||||
@ -100,8 +101,8 @@ void MemoryCheckDlg::OnOK(wxCommandEvent& /*event*/)
|
||||
MemCheck.Log = true;
|
||||
MemCheck.Break = true;
|
||||
|
||||
CBreakPoints::AddMemoryCheck(MemCheck);
|
||||
CBreakPoints::UpdateBreakPointView();
|
||||
MemChecks::Add(MemCheck);
|
||||
Host_UpdateBreakPointView();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user