mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +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}
|
||||
{$Q-}{$R-}
|
||||
Result := AValue + FOwner.RelocationOffset;
|
||||
if FAddressSize = 4 then
|
||||
Result := DWORD(Result);
|
||||
{$pop}
|
||||
end;
|
||||
|
||||
|
@ -531,8 +531,8 @@ begin
|
||||
|
||||
SymbolName:=pchar(SymbolStr+SymbolArr32^[i].st_name);
|
||||
{$Q-}{$R-}
|
||||
AfpSymbolInfo.Add(SymbolName, TDBGPtr(SymbolArr32^[i].st_value+RelocationOffset),
|
||||
Sect^.Address + Sect^.Size+RelocationOffset);
|
||||
AfpSymbolInfo.Add(SymbolName, DWord(SymbolArr32^[i].st_value+RelocationOffset),
|
||||
DWORD(Sect^.Address + Sect^.Size+RelocationOffset));
|
||||
end;
|
||||
{$pop}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user