[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/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()
{
m_Debugging = FALSE;
@ -91,7 +80,7 @@ bool CBreakpoints::WBPAdd(uint32_t address, bool bTemporary)
return false;
}
bool CBreakpoints::EBPAdd(uint32_t address, bool bTemporary)
bool CBreakpoints::AddExecution(uint32_t address, bool bTemporary)
{
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);
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)
{
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)
{
m_ReadMem.erase(itr);
m_Execution.erase(itr);
}
return BP_SET_TEMP;
}

View File

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

View File

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

View File

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