[Debugger] Add Debugger_HaveExecutionBP
This commit is contained in:
parent
f6dc66ce69
commit
b4c1a687e2
|
@ -19,6 +19,7 @@ bool CDebugSettings::m_bShowTLBMisses = false;
|
||||||
bool CDebugSettings::m_bShowDivByZero = false;
|
bool CDebugSettings::m_bShowDivByZero = false;
|
||||||
bool CDebugSettings::m_Registered = false;
|
bool CDebugSettings::m_Registered = false;
|
||||||
bool CDebugSettings::m_RecordExecutionTimes = false;
|
bool CDebugSettings::m_RecordExecutionTimes = false;
|
||||||
|
bool CDebugSettings::m_HaveExecutionBP = false;
|
||||||
|
|
||||||
CDebugSettings::CDebugSettings()
|
CDebugSettings::CDebugSettings()
|
||||||
{
|
{
|
||||||
|
@ -31,6 +32,7 @@ CDebugSettings::CDebugSettings()
|
||||||
g_Settings->RegisterChangeCB(Debugger_ShowTLBMisses, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
g_Settings->RegisterChangeCB(Debugger_ShowTLBMisses, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||||
g_Settings->RegisterChangeCB(Debugger_ShowDivByZero, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
g_Settings->RegisterChangeCB(Debugger_ShowDivByZero, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||||
g_Settings->RegisterChangeCB(Debugger_RecordExecutionTimes, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
g_Settings->RegisterChangeCB(Debugger_RecordExecutionTimes, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||||
|
g_Settings->RegisterChangeCB(Debugger_HaveExecutionBP, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||||
|
|
||||||
RefreshSettings();
|
RefreshSettings();
|
||||||
}
|
}
|
||||||
|
@ -46,6 +48,7 @@ CDebugSettings::~CDebugSettings()
|
||||||
g_Settings->UnregisterChangeCB(Debugger_ShowTLBMisses, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
g_Settings->UnregisterChangeCB(Debugger_ShowTLBMisses, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||||
g_Settings->UnregisterChangeCB(Debugger_ShowDivByZero, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
g_Settings->UnregisterChangeCB(Debugger_ShowDivByZero, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||||
g_Settings->UnregisterChangeCB(Debugger_RecordExecutionTimes, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
g_Settings->UnregisterChangeCB(Debugger_RecordExecutionTimes, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||||
|
g_Settings->UnregisterChangeCB(Debugger_HaveExecutionBP, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,4 +59,5 @@ void CDebugSettings::RefreshSettings()
|
||||||
m_bShowTLBMisses = m_bHaveDebugger && g_Settings->LoadBool(Debugger_ShowTLBMisses);
|
m_bShowTLBMisses = m_bHaveDebugger && g_Settings->LoadBool(Debugger_ShowTLBMisses);
|
||||||
m_bShowDivByZero = m_bHaveDebugger && g_Settings->LoadBool(Debugger_ShowDivByZero);
|
m_bShowDivByZero = m_bHaveDebugger && g_Settings->LoadBool(Debugger_ShowDivByZero);
|
||||||
m_RecordExecutionTimes = g_Settings->LoadBool(Debugger_RecordExecutionTimes);
|
m_RecordExecutionTimes = g_Settings->LoadBool(Debugger_RecordExecutionTimes);
|
||||||
|
m_HaveExecutionBP = g_Settings->LoadBool(Debugger_HaveExecutionBP);
|
||||||
}
|
}
|
|
@ -23,6 +23,7 @@ public:
|
||||||
static inline bool bShowTLBMisses(void) { return m_bShowTLBMisses; }
|
static inline bool bShowTLBMisses(void) { return m_bShowTLBMisses; }
|
||||||
static inline bool bShowDivByZero(void) { return m_bShowDivByZero; }
|
static inline bool bShowDivByZero(void) { return m_bShowDivByZero; }
|
||||||
static inline bool bRecordExecutionTimes(void) { return m_RecordExecutionTimes; }
|
static inline bool bRecordExecutionTimes(void) { return m_RecordExecutionTimes; }
|
||||||
|
static inline bool HaveExecutionBP(void) { return m_HaveExecutionBP; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void StaticRefreshSettings(CDebugSettings * _this)
|
static void StaticRefreshSettings(CDebugSettings * _this)
|
||||||
|
@ -38,6 +39,7 @@ private:
|
||||||
static bool m_bShowTLBMisses;
|
static bool m_bShowTLBMisses;
|
||||||
static bool m_bShowDivByZero;
|
static bool m_bShowDivByZero;
|
||||||
static bool m_RecordExecutionTimes;
|
static bool m_RecordExecutionTimes;
|
||||||
|
static bool m_HaveExecutionBP;
|
||||||
|
|
||||||
static int32_t m_RefCount;
|
static int32_t m_RefCount;
|
||||||
static bool m_Registered;
|
static bool m_Registered;
|
||||||
|
|
|
@ -229,6 +229,7 @@ enum SettingID
|
||||||
Debugger_ShowRecompMemSize,
|
Debugger_ShowRecompMemSize,
|
||||||
Debugger_DebugLanguage,
|
Debugger_DebugLanguage,
|
||||||
Debugger_RecordExecutionTimes,
|
Debugger_RecordExecutionTimes,
|
||||||
|
Debugger_HaveExecutionBP,
|
||||||
|
|
||||||
//Trace
|
//Trace
|
||||||
Debugger_TraceMD5,
|
Debugger_TraceMD5,
|
||||||
|
|
|
@ -314,6 +314,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
||||||
AddHandler(Debugger_ShowDListAListCount, new CSettingTypeApplication("Debugger", "Show Dlist Alist Count", false));
|
AddHandler(Debugger_ShowDListAListCount, new CSettingTypeApplication("Debugger", "Show Dlist Alist Count", false));
|
||||||
AddHandler(Debugger_ShowRecompMemSize, new CSettingTypeApplication("Debugger", "Show Recompiler Memory size", false));
|
AddHandler(Debugger_ShowRecompMemSize, new CSettingTypeApplication("Debugger", "Show Recompiler Memory size", false));
|
||||||
AddHandler(Debugger_RecordExecutionTimes, new CSettingTypeApplication("Debugger", "Record Execution Times", false));
|
AddHandler(Debugger_RecordExecutionTimes, new CSettingTypeApplication("Debugger", "Record Execution Times", false));
|
||||||
|
AddHandler(Debugger_HaveExecutionBP, new CSettingTypeTempBool(false));
|
||||||
AddHandler(Debugger_DebugLanguage, new CSettingTypeApplication("Debugger", "Debug Language", false));
|
AddHandler(Debugger_DebugLanguage, new CSettingTypeApplication("Debugger", "Debug Language", false));
|
||||||
AddHandler(Debugger_ShowDivByZero, new CSettingTypeApplication("Debugger", "Show Div by zero", false));
|
AddHandler(Debugger_ShowDivByZero, new CSettingTypeApplication("Debugger", "Show Div by zero", false));
|
||||||
AddHandler(Debugger_AppLogFlush, new CSettingTypeApplication("Logging", "Log Auto Flush", (uint32_t)false));
|
AddHandler(Debugger_AppLogFlush, new CSettingTypeApplication("Logging", "Log Auto Flush", (uint32_t)false));
|
||||||
|
|
|
@ -82,12 +82,16 @@ bool CBreakpoints::WBPAdd(uint32_t address, bool bTemporary)
|
||||||
|
|
||||||
bool CBreakpoints::AddExecution(uint32_t address, bool bTemporary)
|
bool CBreakpoints::AddExecution(uint32_t address, bool bTemporary)
|
||||||
{
|
{
|
||||||
if (!ExecutionBPExists(address))
|
breakpoints_t::_Pairib res = m_Execution.insert(breakpoint_t::value_type(address, bTemporary));
|
||||||
|
if (!res.second && !bTemporary)
|
||||||
{
|
{
|
||||||
m_Execution.insert(breakpoints_t::value_type(address, bTemporary));
|
res.first->second = true;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
if (!HaveExecutionBP())
|
||||||
|
{
|
||||||
|
g_Settings->SaveBool(Debugger_HaveExecutionBP, true);
|
||||||
|
}
|
||||||
|
return !res.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBreakpoints::RBPRemove(uint32_t address)
|
void CBreakpoints::RBPRemove(uint32_t address)
|
||||||
|
@ -114,6 +118,10 @@ void CBreakpoints::RemoveExecution(uint32_t address)
|
||||||
if (itr != m_Execution.end())
|
if (itr != m_Execution.end())
|
||||||
{
|
{
|
||||||
m_Execution.erase(itr);
|
m_Execution.erase(itr);
|
||||||
|
if (m_Execution.size() == 0)
|
||||||
|
{
|
||||||
|
g_Settings->SaveBool(Debugger_HaveExecutionBP, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
#include <Common\stdtypes.h>
|
#include <Common\stdtypes.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
class CBreakpoints
|
class CBreakpoints :
|
||||||
|
private CDebugSettings
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::map<uint32_t /*address*/, bool /*bTemporary*/> breakpoints_t;
|
typedef std::map<uint32_t /*address*/, bool /*bTemporary*/> breakpoints_t;
|
||||||
|
|
|
@ -67,7 +67,8 @@ private:
|
||||||
IDC_R28_EDIT, IDC_R29_EDIT, IDC_R30_EDIT, IDC_R31_EDIT,
|
IDC_R28_EDIT, IDC_R29_EDIT, IDC_R30_EDIT, IDC_R31_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD FPREditIds[] = {
|
static constexpr WORD FPREditIds[] =
|
||||||
|
{
|
||||||
IDC_F0_EDIT, IDC_F1_EDIT, IDC_F2_EDIT, IDC_F3_EDIT,
|
IDC_F0_EDIT, IDC_F1_EDIT, IDC_F2_EDIT, IDC_F3_EDIT,
|
||||||
IDC_F4_EDIT, IDC_F5_EDIT, IDC_F6_EDIT, IDC_F7_EDIT,
|
IDC_F4_EDIT, IDC_F5_EDIT, IDC_F6_EDIT, IDC_F7_EDIT,
|
||||||
IDC_F8_EDIT, IDC_F9_EDIT, IDC_F10_EDIT, IDC_F11_EDIT,
|
IDC_F8_EDIT, IDC_F9_EDIT, IDC_F10_EDIT, IDC_F11_EDIT,
|
||||||
|
@ -78,7 +79,8 @@ private:
|
||||||
IDC_F28_EDIT, IDC_F29_EDIT, IDC_F30_EDIT, IDC_F31_EDIT,
|
IDC_F28_EDIT, IDC_F29_EDIT, IDC_F30_EDIT, IDC_F31_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD COP0EditIds[] = {
|
static constexpr WORD COP0EditIds[] =
|
||||||
|
{
|
||||||
IDC_COP0_0_EDIT, IDC_COP0_1_EDIT, IDC_COP0_2_EDIT, IDC_COP0_3_EDIT,
|
IDC_COP0_0_EDIT, IDC_COP0_1_EDIT, IDC_COP0_2_EDIT, IDC_COP0_3_EDIT,
|
||||||
IDC_COP0_4_EDIT, IDC_COP0_5_EDIT, IDC_COP0_6_EDIT, IDC_COP0_7_EDIT,
|
IDC_COP0_4_EDIT, IDC_COP0_5_EDIT, IDC_COP0_6_EDIT, IDC_COP0_7_EDIT,
|
||||||
IDC_COP0_8_EDIT, IDC_COP0_9_EDIT, IDC_COP0_10_EDIT, IDC_COP0_11_EDIT,
|
IDC_COP0_8_EDIT, IDC_COP0_9_EDIT, IDC_COP0_10_EDIT, IDC_COP0_11_EDIT,
|
||||||
|
@ -86,55 +88,65 @@ private:
|
||||||
IDC_COP0_16_EDIT, IDC_COP0_17_EDIT, IDC_COP0_18_EDIT,
|
IDC_COP0_16_EDIT, IDC_COP0_17_EDIT, IDC_COP0_18_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD RDRAMEditIds[] = {
|
static constexpr WORD RDRAMEditIds[] =
|
||||||
|
{
|
||||||
IDC_RDRAM00_EDIT, IDC_RDRAM04_EDIT, IDC_RDRAM08_EDIT, IDC_RDRAM0C_EDIT,
|
IDC_RDRAM00_EDIT, IDC_RDRAM04_EDIT, IDC_RDRAM08_EDIT, IDC_RDRAM0C_EDIT,
|
||||||
IDC_RDRAM10_EDIT, IDC_RDRAM14_EDIT, IDC_RDRAM18_EDIT, IDC_RDRAM1C_EDIT,
|
IDC_RDRAM10_EDIT, IDC_RDRAM14_EDIT, IDC_RDRAM18_EDIT, IDC_RDRAM1C_EDIT,
|
||||||
IDC_RDRAM20_EDIT, IDC_RDRAM24_EDIT,
|
IDC_RDRAM20_EDIT, IDC_RDRAM24_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD SPEditIds[] = {
|
static constexpr WORD SPEditIds[] =
|
||||||
|
{
|
||||||
IDC_SP00_EDIT, IDC_SP04_EDIT, IDC_SP08_EDIT, IDC_SP0C_EDIT,
|
IDC_SP00_EDIT, IDC_SP04_EDIT, IDC_SP08_EDIT, IDC_SP0C_EDIT,
|
||||||
IDC_SP10_EDIT, IDC_SP14_EDIT, IDC_SP18_EDIT, IDC_SP1C_EDIT,
|
IDC_SP10_EDIT, IDC_SP14_EDIT, IDC_SP18_EDIT, IDC_SP1C_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD DPCEditIds[] = {
|
static constexpr WORD DPCEditIds[] =
|
||||||
|
{
|
||||||
IDC_DPC00_EDIT, IDC_DPC04_EDIT, IDC_DPC08_EDIT, IDC_DPC0C_EDIT,
|
IDC_DPC00_EDIT, IDC_DPC04_EDIT, IDC_DPC08_EDIT, IDC_DPC0C_EDIT,
|
||||||
IDC_DPC10_EDIT, IDC_DPC14_EDIT, IDC_DPC18_EDIT, IDC_DPC1C_EDIT,
|
IDC_DPC10_EDIT, IDC_DPC14_EDIT, IDC_DPC18_EDIT, IDC_DPC1C_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD MIEditIds[] = {
|
static constexpr WORD MIEditIds[] =
|
||||||
|
{
|
||||||
IDC_MI00_EDIT, IDC_MI04_EDIT, IDC_MI08_EDIT, IDC_MI0C_EDIT,
|
IDC_MI00_EDIT, IDC_MI04_EDIT, IDC_MI08_EDIT, IDC_MI0C_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD VIEditIds[] = {
|
static constexpr WORD VIEditIds[] =
|
||||||
|
{
|
||||||
IDC_VI00_EDIT, IDC_VI04_EDIT, IDC_VI08_EDIT, IDC_VI0C_EDIT,
|
IDC_VI00_EDIT, IDC_VI04_EDIT, IDC_VI08_EDIT, IDC_VI0C_EDIT,
|
||||||
IDC_VI10_EDIT, IDC_VI14_EDIT, IDC_VI18_EDIT, IDC_VI1C_EDIT,
|
IDC_VI10_EDIT, IDC_VI14_EDIT, IDC_VI18_EDIT, IDC_VI1C_EDIT,
|
||||||
IDC_VI20_EDIT, IDC_VI24_EDIT, IDC_VI28_EDIT, IDC_VI2C_EDIT,
|
IDC_VI20_EDIT, IDC_VI24_EDIT, IDC_VI28_EDIT, IDC_VI2C_EDIT,
|
||||||
IDC_VI30_EDIT, IDC_VI34_EDIT,
|
IDC_VI30_EDIT, IDC_VI34_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD AIEditIds[] = {
|
static constexpr WORD AIEditIds[] =
|
||||||
|
{
|
||||||
IDC_AI00_EDIT, IDC_AI04_EDIT, IDC_AI08_EDIT, IDC_AI0C_EDIT,
|
IDC_AI00_EDIT, IDC_AI04_EDIT, IDC_AI08_EDIT, IDC_AI0C_EDIT,
|
||||||
IDC_AI10_EDIT, IDC_AI14_EDIT,
|
IDC_AI10_EDIT, IDC_AI14_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD PIEditIds[] = {
|
static constexpr WORD PIEditIds[] =
|
||||||
|
{
|
||||||
IDC_PI00_EDIT, IDC_PI04_EDIT, IDC_PI08_EDIT, IDC_PI0C_EDIT,
|
IDC_PI00_EDIT, IDC_PI04_EDIT, IDC_PI08_EDIT, IDC_PI0C_EDIT,
|
||||||
IDC_PI10_EDIT, IDC_PI14_EDIT, IDC_PI18_EDIT, IDC_PI1C_EDIT,
|
IDC_PI10_EDIT, IDC_PI14_EDIT, IDC_PI18_EDIT, IDC_PI1C_EDIT,
|
||||||
IDC_PI20_EDIT, IDC_PI24_EDIT, IDC_PI28_EDIT, IDC_PI2C_EDIT,
|
IDC_PI20_EDIT, IDC_PI24_EDIT, IDC_PI28_EDIT, IDC_PI2C_EDIT,
|
||||||
IDC_PI30_EDIT,
|
IDC_PI30_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD RIEditIds[] = {
|
static constexpr WORD RIEditIds[] =
|
||||||
|
{
|
||||||
IDC_RI00_EDIT, IDC_RI04_EDIT, IDC_RI08_EDIT, IDC_RI0C_EDIT,
|
IDC_RI00_EDIT, IDC_RI04_EDIT, IDC_RI08_EDIT, IDC_RI0C_EDIT,
|
||||||
IDC_RI10_EDIT, IDC_RI14_EDIT, IDC_RI18_EDIT, IDC_RI1C_EDIT,
|
IDC_RI10_EDIT, IDC_RI14_EDIT, IDC_RI18_EDIT, IDC_RI1C_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD SIEditIds[] = {
|
static constexpr WORD SIEditIds[] =
|
||||||
|
{
|
||||||
IDC_SI00_EDIT, IDC_SI04_EDIT, IDC_SI08_EDIT, IDC_SI0C_EDIT,
|
IDC_SI00_EDIT, IDC_SI04_EDIT, IDC_SI08_EDIT, IDC_SI0C_EDIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr WORD DDEditIds[] = {
|
static constexpr WORD DDEditIds[] =
|
||||||
|
{
|
||||||
IDC_DD00_EDIT, IDC_DD04_EDIT, IDC_DD08_EDIT, IDC_DD0C_EDIT,
|
IDC_DD00_EDIT, IDC_DD04_EDIT, IDC_DD08_EDIT, IDC_DD0C_EDIT,
|
||||||
IDC_DD10_EDIT, IDC_DD14_EDIT, IDC_DD18_EDIT, IDC_DD1C_EDIT,
|
IDC_DD10_EDIT, IDC_DD14_EDIT, IDC_DD18_EDIT, IDC_DD1C_EDIT,
|
||||||
IDC_DD20_EDIT, IDC_DD24_EDIT, IDC_DD28_EDIT, IDC_DD2C_EDIT,
|
IDC_DD20_EDIT, IDC_DD24_EDIT, IDC_DD28_EDIT, IDC_DD2C_EDIT,
|
||||||
|
@ -154,7 +166,8 @@ private:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr char* ExceptionCodes[] = {
|
static constexpr char* ExceptionCodes[] =
|
||||||
|
{
|
||||||
"Interrupt",
|
"Interrupt",
|
||||||
"TLB mod",
|
"TLB mod",
|
||||||
"TLB load/fetch",
|
"TLB load/fetch",
|
||||||
|
|
Loading…
Reference in New Issue