mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Debugger: Fix initialization issues.
Sometimes temp breakpoints had log set by accident.
This commit is contained in:
parent
2e2d8f2989
commit
3c8cc5ab64
2 changed files with 17 additions and 34 deletions
|
@ -33,11 +33,6 @@ u64 CBreakPoints::breakSkipFirstTicks_ = 0;
|
|||
std::vector<MemCheck> CBreakPoints::memChecks_;
|
||||
std::vector<MemCheck *> 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()) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue