mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 09:49:22 +02:00
FpDebug: Handle overflow for relocation with 32bit target. RelocationOffset is stored as QWord, but can be negative. For 32bit targets the overflow must be masked out.
(cherry picked from commit 0fad4e40d9
)
This commit is contained in:
parent
6169d36d26
commit
b2d23daac6
@ -5386,6 +5386,8 @@ begin
|
|||||||
{$push}
|
{$push}
|
||||||
{$Q-}{$R-}
|
{$Q-}{$R-}
|
||||||
Result := AValue + FOwner.RelocationOffset;
|
Result := AValue + FOwner.RelocationOffset;
|
||||||
|
if FAddressSize = 4 then
|
||||||
|
Result := DWORD(Result);
|
||||||
{$pop}
|
{$pop}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -531,8 +531,8 @@ begin
|
|||||||
|
|
||||||
SymbolName:=pchar(SymbolStr+SymbolArr32^[i].st_name);
|
SymbolName:=pchar(SymbolStr+SymbolArr32^[i].st_name);
|
||||||
{$Q-}{$R-}
|
{$Q-}{$R-}
|
||||||
AfpSymbolInfo.Add(SymbolName, TDBGPtr(SymbolArr32^[i].st_value+RelocationOffset),
|
AfpSymbolInfo.Add(SymbolName, DWord(SymbolArr32^[i].st_value+RelocationOffset),
|
||||||
Sect^.Address + Sect^.Size+RelocationOffset);
|
DWORD(Sect^.Address + Sect^.Size+RelocationOffset));
|
||||||
end;
|
end;
|
||||||
{$pop}
|
{$pop}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user