FpDebug: Fix range check (addresses in target are allowed to overflow)

git-svn-id: trunk@62386 -
This commit is contained in:
martin 2019-12-14 15:56:26 +00:00
parent 5a05f2845f
commit 9a11939004

View File

@ -2284,13 +2284,17 @@ begin
LastFrameBase := FrameBase;
if OutSideFrame then begin
if not Process.ReadData(StackPtr, Size, Address) or (Address = 0) then Break;
{$PUSH}{$R-}{$Q-}
StackPtr := StackPtr + 1 * Size; // After popping return-addr from "StackPtr"
LastFrameBase := LastFrameBase - 1; // Make the loop think thas LastFrameBase was smaller
{$POP}
// last stack has no frame
//AnEntry.RegisterValueList.DbgRegisterAutoCreate[nBP].SetValue(0, '0',Size, BP);
end
else begin
{$PUSH}{$R-}{$Q-}
StackPtr := FrameBase + 2 * Size; // After popping return-addr from "FrameBase + Size"
{$POP}
if not Process.ReadData(FrameBase + Size, Size, Address) or (Address = 0) then Break;
if not Process.ReadData(FrameBase, Size, FrameBase) then Break;
end;