Merge branch 'strrec-cpu64-align-fpdbg' into 'main'

FpDebug takes into account that FPC 3.3.1 changed offset of the CodePage field in TAnsiRec

See merge request freepascal.org/lazarus/lazarus!25
This commit is contained in:
Martin 2021-10-17 13:15:46 +00:00
commit dd31014237

View File

@ -1431,7 +1431,10 @@ begin
// use these hardcoded information, and hope that FPC does not change and
// we never reach this point for a compilationunit that is not compiled by
// fpc.
CodepageOffset := AddressSize * 3;
if TFpDwarfFreePascalSymbolClassMapDwarf3(TypeInfo.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion >= $030300{$030301} then
CodepageOffset := AddressSize + SizeOf(Longint) + SizeOf(Word) + SizeOf(Word)
else
CodepageOffset := AddressSize * 3;
Addr.Address := Addr.Address - CodepageOffset;
if Context.ReadMemory(Addr, SizeVal(2), @Codepage) then
Result := CodePageToCodePageName(Codepage) <> '';