[UserInterface] Rename some execution beakpoint functions

This commit is contained in:
zilmar 2017-12-04 17:41:27 +11:00
parent 52693ae92d
commit 44172b5936
4 changed files with 12 additions and 23 deletions

View File

@ -17,17 +17,6 @@
#include <Project64-core/N64System/Mips/OpcodeName.h> #include <Project64-core/N64System/Mips/OpcodeName.h>
#include <Project64-core/N64System/N64Class.h> #include <Project64-core/N64System/N64Class.h>
//BOOL CBreakpoints::m_Debugging = FALSE;
//BOOL CBreakpoints::m_Skipping = FALSE;
//
//std::vector<uint32_t> CBreakpoints::m_RBP;
//std::vector<uint32_t> CBreakpoints::m_WBP;
//std::vector<uint32_t> CBreakpoints::m_EBP;
//
//int CBreakpoints::m_nRBP = 0;
//int CBreakpoints::m_nWBP = 0;
//int CBreakpoints::m_nEBP = 0;
CBreakpoints::CBreakpoints() CBreakpoints::CBreakpoints()
{ {
m_Debugging = FALSE; m_Debugging = FALSE;
@ -91,7 +80,7 @@ bool CBreakpoints::WBPAdd(uint32_t address, bool bTemporary)
return false; return false;
} }
bool CBreakpoints::EBPAdd(uint32_t address, bool bTemporary) bool CBreakpoints::AddExecution(uint32_t address, bool bTemporary)
{ {
if (!ExecutionBPExists(address)) if (!ExecutionBPExists(address))
{ {
@ -119,7 +108,7 @@ void CBreakpoints::WBPRemove(uint32_t address)
} }
} }
void CBreakpoints::EBPRemove(uint32_t address) void CBreakpoints::RemoveExecution(uint32_t address)
{ {
breakpoints_t::iterator itr = m_Execution.find(address); breakpoints_t::iterator itr = m_Execution.find(address);
if (itr != m_Execution.end()) if (itr != m_Execution.end())
@ -146,9 +135,9 @@ void CBreakpoints::WBPToggle(uint32_t address, bool bTemporary)
void CBreakpoints::EBPToggle(uint32_t address, bool bTemporary) void CBreakpoints::EBPToggle(uint32_t address, bool bTemporary)
{ {
if (EBPAdd(address, bTemporary) == false) if (AddExecution(address, bTemporary) == false)
{ {
EBPRemove(address); RemoveExecution(address);
} }
} }
@ -219,7 +208,7 @@ CBreakpoints::BPSTATE CBreakpoints::ExecutionBPExists(uint32_t address, bool bRe
{ {
if (bRemoveTemp) if (bRemoveTemp)
{ {
m_ReadMem.erase(itr); m_Execution.erase(itr);
} }
return BP_SET_TEMP; return BP_SET_TEMP;
} }

View File

@ -54,8 +54,8 @@ public:
void WBPToggle(uint32_t address, bool bTemporary = false); void WBPToggle(uint32_t address, bool bTemporary = false);
void WBPClear(); void WBPClear();
bool EBPAdd(uint32_t address, bool bTemporary = false); bool AddExecution(uint32_t address, bool bTemporary = false);
void EBPRemove(uint32_t address); void RemoveExecution(uint32_t address);
void EBPToggle(uint32_t address, bool bTemporary = false); void EBPToggle(uint32_t address, bool bTemporary = false);
void EBPClear(); void EBPClear();

View File

@ -45,7 +45,7 @@ LRESULT CAddBreakpointDlg::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND, BOOL&
} }
if (m_ExecuteCheck.GetCheck()) if (m_ExecuteCheck.GetCheck())
{ {
breakpoints->EBPAdd(address); breakpoints->AddExecution(address);
} }
EndDialog(0); EndDialog(0);
break; break;

View File

@ -1065,7 +1065,7 @@ void CDebugCommandsView::RemoveSelectedBreakpoints()
switch (itemText[0]) switch (itemText[0])
{ {
case 'E': case 'E':
m_Breakpoints->EBPRemove(address); m_Breakpoints->RemoveExecution(address);
break; break;
case 'W': case 'W':
m_Breakpoints->WBPRemove(address); m_Breakpoints->WBPRemove(address);
@ -1135,7 +1135,7 @@ LRESULT CDebugCommandsView::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWn
break; break;
case ID_POPUPMENU_RUNTO: case ID_POPUPMENU_RUNTO:
// Add temp bp and resume // Add temp bp and resume
m_Breakpoints->EBPAdd(m_SelectedAddress, true); m_Breakpoints->AddExecution(m_SelectedAddress, true);
case IDC_GO_BTN: case IDC_GO_BTN:
CPUResume(); CPUResume();
m_AddressEdit.SetFocus(); m_AddressEdit.SetFocus();
@ -1293,11 +1293,11 @@ LRESULT CDebugCommandsView::OnCommandListDblClicked(NMHDR* pNMHDR)
uint32_t address = m_StartAddress + nItem * 4; uint32_t address = m_StartAddress + nItem * 4;
if (m_Breakpoints->ExecutionBPExists(address)) if (m_Breakpoints->ExecutionBPExists(address))
{ {
m_Breakpoints->EBPRemove(address); m_Breakpoints->RemoveExecution(address);
} }
else else
{ {
m_Breakpoints->EBPAdd(address); m_Breakpoints->AddExecution(address);
} }
// Cancel blue highlight // Cancel blue highlight
m_AddressEdit.SetFocus(); m_AddressEdit.SetFocus();