mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 07:38:15 +02:00
Fix offset of return PC on stack. Trivial (no locals or parameters) stack trace now works.
This commit is contained in:
parent
165c4dae9a
commit
762081ec6f
@ -573,7 +573,7 @@ begin
|
||||
if OutSideFrame then begin
|
||||
// at start of prologue, before pushing starts, so return PC should be at current SP+1
|
||||
// To read SRAM this needs to be masked by $800000
|
||||
if not Process.ReadData(DataOffset or StackPtr + 1, Size, Address) or (Address = 0) then Break;
|
||||
if not Process.ReadData(DataOffset or (StackPtr + Size, Size, Address) or (Address = 0) then Break;
|
||||
// Convert return address from BE to LE, shl 1 to get byte address
|
||||
Address := BEtoN(word(Address)) shl 1;
|
||||
{$PUSH}{$R-}{$Q-}
|
||||
|
Loading…
Reference in New Issue
Block a user