mirror of
https://github.com/libretro/Mesen.git
synced 2024-12-02 22:56:57 +00:00
Debugger: Fixed callstack displaying incorrect data when breaking on a RTS instruction
This commit is contained in:
parent
5b8800f038
commit
7ccf093a7e
@ -365,9 +365,10 @@ void Debugger::RemoveExcessCallstackEntries()
|
||||
}
|
||||
}
|
||||
|
||||
void Debugger::UpdateCallstack(uint32_t addr)
|
||||
void Debugger::UpdateCallstack(uint8_t currentInstruction, uint32_t addr)
|
||||
{
|
||||
_hideTopOfCallstack = false;
|
||||
|
||||
if((_lastInstruction == 0x60 || _lastInstruction == 0x40) && !_callstackRelative.empty()) {
|
||||
//RTS & RTI
|
||||
_callstackRelative.pop_back();
|
||||
@ -376,7 +377,9 @@ void Debugger::UpdateCallstack(uint32_t addr)
|
||||
_callstackAbsolute.pop_back();
|
||||
|
||||
_profiler->UnstackFunction();
|
||||
} else if(_lastInstruction == 0x20) {
|
||||
}
|
||||
|
||||
if(currentInstruction == 0x20) {
|
||||
//JSR
|
||||
RemoveExcessCallstackEntries();
|
||||
|
||||
@ -591,8 +594,8 @@ bool Debugger::PrivateProcessRamOperation(MemoryOperationType type, uint16_t &ad
|
||||
}
|
||||
}
|
||||
|
||||
UpdateCallstack(value, addr);
|
||||
_lastInstruction = value;
|
||||
UpdateCallstack(addr);
|
||||
|
||||
breakDone = SleepUntilResume();
|
||||
|
||||
|
@ -129,7 +129,7 @@ private:
|
||||
void PrivateProcessVramWriteOperation(uint16_t addr, uint8_t &value);
|
||||
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 ProcessStepConditions(uint32_t addr);
|
||||
|
Loading…
Reference in New Issue
Block a user