FpDebug: fix :refcnt for fpc 3.3.1

(cherry picked from commit c398363932)
This commit is contained in:
Martin 2023-12-02 14:05:58 +01:00
parent 54ffa1df0e
commit 45e39252e1

View File

@ -1886,8 +1886,15 @@ begin
if not IsReadableLoc(Addr) then
exit;
Addr:= Addr - (AddressSize * 2);
Result := Context.ReadSignedInt(Addr, SizeVal(AddressSize), ARefCount);
if TFpDwarfFreePascalSymbolClassMap(TypeInfo.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion >= $030301
then begin
Addr:= Addr - AddressSize - 4;
Result := Context.ReadSignedInt(Addr, SizeVal(4), ARefCount);
end
else begin
Addr:= Addr - (AddressSize * 2);
Result := Context.ReadSignedInt(Addr, SizeVal(AddressSize), ARefCount);
end;
end;
function TFpValueDwarfV3FreePascalString.ObtainDynamicCodePage(Addr: TFpDbgMemLocation; out