Debugger: Fixed callstack displaying incorrect data when breaking on a RTS instruction
This commit is contained in:
parent
5b8800f038
commit
7ccf093a7e
2 changed files with 7 additions and 4 deletions
|
@ -365,9 +365,10 @@ void Debugger::RemoveExcessCallstackEntries()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Debugger::UpdateCallstack(uint32_t addr)
|
void Debugger::UpdateCallstack(uint8_t currentInstruction, uint32_t addr)
|
||||||
{
|
{
|
||||||
_hideTopOfCallstack = false;
|
_hideTopOfCallstack = false;
|
||||||
|
|
||||||
if((_lastInstruction == 0x60 || _lastInstruction == 0x40) && !_callstackRelative.empty()) {
|
if((_lastInstruction == 0x60 || _lastInstruction == 0x40) && !_callstackRelative.empty()) {
|
||||||
//RTS & RTI
|
//RTS & RTI
|
||||||
_callstackRelative.pop_back();
|
_callstackRelative.pop_back();
|
||||||
|
@ -376,7 +377,9 @@ void Debugger::UpdateCallstack(uint32_t addr)
|
||||||
_callstackAbsolute.pop_back();
|
_callstackAbsolute.pop_back();
|
||||||
|
|
||||||
_profiler->UnstackFunction();
|
_profiler->UnstackFunction();
|
||||||
} else if(_lastInstruction == 0x20) {
|
}
|
||||||
|
|
||||||
|
if(currentInstruction == 0x20) {
|
||||||
//JSR
|
//JSR
|
||||||
RemoveExcessCallstackEntries();
|
RemoveExcessCallstackEntries();
|
||||||
|
|
||||||
|
@ -591,8 +594,8 @@ bool Debugger::PrivateProcessRamOperation(MemoryOperationType type, uint16_t &ad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UpdateCallstack(value, addr);
|
||||||
_lastInstruction = value;
|
_lastInstruction = value;
|
||||||
UpdateCallstack(addr);
|
|
||||||
|
|
||||||
breakDone = SleepUntilResume();
|
breakDone = SleepUntilResume();
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ private:
|
||||||
void PrivateProcessVramWriteOperation(uint16_t addr, uint8_t &value);
|
void PrivateProcessVramWriteOperation(uint16_t addr, uint8_t &value);
|
||||||
void ProcessBreakpoints(BreakpointType type, OperationInfo &operationInfo, bool allowBreak = true);
|
void ProcessBreakpoints(BreakpointType type, OperationInfo &operationInfo, bool allowBreak = true);
|
||||||
|
|
||||||
void UpdateCallstack(uint32_t addr);
|
void UpdateCallstack(uint8_t currentInstruction, uint32_t addr);
|
||||||
void PrivateProcessInterrupt(uint16_t cpuAddr, uint16_t destCpuAddr, bool forNmi);
|
void PrivateProcessInterrupt(uint16_t cpuAddr, uint16_t destCpuAddr, bool forNmi);
|
||||||
|
|
||||||
void ProcessStepConditions(uint32_t addr);
|
void ProcessStepConditions(uint32_t addr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue