diff --git a/Core/Debugger/Breakpoints.cpp b/Core/Debugger/Breakpoints.cpp index 9f7a27d39f..597d2a8f2d 100644 --- a/Core/Debugger/Breakpoints.cpp +++ b/Core/Debugger/Breakpoints.cpp @@ -33,11 +33,6 @@ u64 CBreakPoints::breakSkipFirstTicks_ = 0; std::vector CBreakPoints::memChecks_; std::vector CBreakPoints::cleanupMemChecks_; -MemCheck::MemCheck() -{ - numHits = 0; -} - void MemCheck::Log(u32 addr, bool write, int size, u32 pc) { if (result & BREAK_ACTION_LOG) { if (logFormat.empty()) { diff --git a/Core/Debugger/Breakpoints.h b/Core/Debugger/Breakpoints.h index 934667914a..2457e45aca 100644 --- a/Core/Debugger/Breakpoints.h +++ b/Core/Debugger/Breakpoints.h @@ -21,8 +21,7 @@ #include "Core/Debugger/DebugInterface.h" -enum BreakAction -{ +enum BreakAction { BREAK_ACTION_IGNORE = 0x00, BREAK_ACTION_LOG = 0x01, BREAK_ACTION_PAUSE = 0x02, @@ -37,35 +36,27 @@ static inline BreakAction operator | (const BreakAction &lhs, const BreakAction return BreakAction((u32)lhs | (u32)rhs); } -struct BreakPointCond -{ - DebugInterface *debug; +struct BreakPointCond { + DebugInterface *debug = nullptr; PostfixExpression expression; std::string expressionString; - BreakPointCond() : debug(nullptr) - { - } - - u32 Evaluate() - { + u32 Evaluate() { u32 result; - if (debug->parseExpression(expression,result) == false) return 0; + if (debug->parseExpression(expression, result) == false) + return 0; return result; } }; -struct BreakPoint -{ - BreakPoint() : hasCond(false) {} - +struct BreakPoint { u32 addr; bool temporary; - BreakAction result; + BreakAction result = BREAK_ACTION_IGNORE; std::string logFormat; - bool hasCond; + bool hasCond = false; BreakPointCond cond; bool IsEnabled() const { @@ -80,8 +71,7 @@ struct BreakPoint } }; -enum MemCheckCondition -{ +enum MemCheckCondition { MEMCHECK_READ = 0x01, MEMCHECK_WRITE = 0x02, MEMCHECK_WRITE_ONCHANGE = 0x04, @@ -89,21 +79,19 @@ enum MemCheckCondition MEMCHECK_READWRITE = 0x03, }; -struct MemCheck -{ - MemCheck(); +struct MemCheck { u32 start; u32 end; - MemCheckCondition cond; - BreakAction result; + MemCheckCondition cond = MEMCHECK_READ; + BreakAction result = BREAK_ACTION_IGNORE; std::string logFormat; - u32 numHits; + u32 numHits = 0; - u32 lastPC; - u32 lastAddr; - int lastSize; + u32 lastPC = 0; + u32 lastAddr = 0; + int lastSize = 0; BreakAction Action(u32 addr, bool write, int size, u32 pc); void JitBefore(u32 addr, bool write, int size, u32 pc);