FpDebug: Another fix for the length of DW_FORM_ref_addr in Dwarf v3

git-svn-id: trunk@46075 -
This commit is contained in:
joost 2014-08-25 20:50:08 +00:00
parent 289f8e8657
commit d062000bf3

View File

@ -3970,9 +3970,10 @@ function TDwarfCompilationUnit.ReadAddressAtPointer(var AData: Pointer;
AIncPointer: Boolean): TFpDbgMemLocation;
begin
// do not need mem reader, address is in dwarf. Should be in correct format
if FAddressSize = 4 // TODO Dwarf3 depends on FIsDwarf64
then Result := TargetLoc(PLongWord(AData)^)
else Result := TargetLoc(PQWord(AData)^);
if ((Version>2) and IsDwarf64) or ((version < 3) and (FAddressSize = 8)) then
Result := TargetLoc(PQWord(AData)^)
else
Result := TargetLoc(PLongWord(AData)^);
if AIncPointer then inc(AData, FAddressSize);
end;