Debugger: Fixed "set next statement" behavior
This commit is contained in:
parent
c1fb8f1ac1
commit
daea6fd915
2 changed files with 9 additions and 5 deletions
|
@ -272,9 +272,10 @@ void Debugger::PrivateProcessPpuCycle()
|
|||
}
|
||||
}
|
||||
|
||||
void Debugger::PrivateProcessRamOperation(MemoryOperationType type, uint16_t &addr, uint8_t value)
|
||||
void Debugger::PrivateProcessRamOperation(MemoryOperationType type, uint16_t &addr, uint8_t &value)
|
||||
{
|
||||
_currentReadAddr = &addr;
|
||||
_currentReadValue = &value;
|
||||
|
||||
//Check if a breakpoint has been hit and freeze execution if one has
|
||||
bool breakDone = false;
|
||||
|
@ -519,6 +520,7 @@ void Debugger::SetNextStatement(uint16_t addr)
|
|||
if(_currentReadAddr) {
|
||||
_cpu->SetDebugPC(addr);
|
||||
*_currentReadAddr = addr;
|
||||
*_currentReadValue = _memoryManager->DebugRead(addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -540,7 +542,7 @@ void Debugger::ProcessPpuCycle()
|
|||
}
|
||||
}
|
||||
|
||||
void Debugger::ProcessRamOperation(MemoryOperationType type, uint16_t &addr, uint8_t value)
|
||||
void Debugger::ProcessRamOperation(MemoryOperationType type, uint16_t &addr, uint8_t &value)
|
||||
{
|
||||
if(Debugger::Instance) {
|
||||
Debugger::Instance->PrivateProcessRamOperation(type, addr, value);
|
||||
|
|
|
@ -81,7 +81,9 @@ private:
|
|||
|
||||
shared_ptr<TraceLogger> _traceLogger;
|
||||
|
||||
uint16_t *_currentReadAddr; //Used to alter the executing address via "Set Next Statement"
|
||||
//Used to alter the executing address via "Set Next Statement"
|
||||
uint16_t *_currentReadAddr;
|
||||
uint8_t *_currentReadValue;
|
||||
|
||||
uint32_t _flags;
|
||||
|
||||
|
@ -98,7 +100,7 @@ private:
|
|||
void UpdateBreakpoints();
|
||||
|
||||
void PrivateProcessPpuCycle();
|
||||
void PrivateProcessRamOperation(MemoryOperationType type, uint16_t &addr, uint8_t value);
|
||||
void PrivateProcessRamOperation(MemoryOperationType type, uint16_t &addr, uint8_t &value);
|
||||
void PrivateProcessVramOperation(MemoryOperationType type, uint16_t addr, uint8_t value);
|
||||
bool HasMatchingBreakpoint(BreakpointType type, uint32_t addr, int16_t value);
|
||||
void UpdateCallstack(uint32_t addr);
|
||||
|
@ -156,7 +158,7 @@ public:
|
|||
|
||||
int32_t EvaluateExpression(string expression, EvalResultType &resultType);
|
||||
|
||||
static void ProcessRamOperation(MemoryOperationType type, uint16_t &addr, uint8_t value);
|
||||
static void ProcessRamOperation(MemoryOperationType type, uint16_t &addr, uint8_t &value);
|
||||
static void ProcessVramOperation(MemoryOperationType type, uint16_t addr, uint8_t value);
|
||||
static void ProcessPpuCycle();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue