debugger improvments

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@25 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
fires.gc 2008-07-17 21:46:34 +00:00
parent 91ccda69ef
commit 343d1ece11
12 changed files with 186 additions and 41 deletions

View file

@ -24,6 +24,7 @@
BEGIN_EVENT_TABLE(CBreakPointView, wxListCtrl)
END_EVENT_TABLE()
CBreakPointView::CBreakPointView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
@ -43,7 +44,10 @@ CBreakPointView::Update()
InsertColumn(0, wxT("Active"), wxLIST_FORMAT_LEFT, 50);
InsertColumn(1, wxT("Type"), wxLIST_FORMAT_LEFT, 50);
InsertColumn(2, wxT("Function"), wxLIST_FORMAT_CENTER, 200);
InsertColumn(3, wxT("Address"), wxLIST_FORMAT_CENTER, 100);
InsertColumn(4, wxT("Flags"), wxLIST_FORMAT_CENTER, 100);
char szBuffer[32];
const CBreakPoints::TBreakPoints& rBreakPoints = CBreakPoints::GetBreakPoints();
for (size_t i=0; i<rBreakPoints.size(); i++)
{
@ -58,12 +62,11 @@ CBreakPointView::Update()
{
SetItem(Item, 2, Debugger::GetDescription(rBP.iAddress));
}
else
{
char szBuffer[32];
sprintf(szBuffer, "0x%08x", rBP.iAddress);
SetItem(Item, 2, szBuffer);
}
sprintf(szBuffer, "0x%08x", rBP.iAddress);
SetItem(Item, 3, szBuffer);
SetItemData(Item, rBP.iAddress);
}
}
@ -71,7 +74,12 @@ CBreakPointView::Update()
Refresh();
}
void CBreakPointView::DeleteCurrentSelection()
{
void CBreakPointView::DeleteCurrentSelection()
{
int Item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (Item >= 0)
{
u32 Address = GetItemData(Item);
CBreakPoints::DeleteElementByAddress(Address);
}
}