From be343003c0985c50164815a5d51eef62e85280a6 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 25 Jul 2024 21:02:35 +0200 Subject: [PATCH] FpDebug: fix incorrect class typecasts --- components/fpdebug/fpdbgdwarffreepascal.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/fpdebug/fpdbgdwarffreepascal.pas b/components/fpdebug/fpdbgdwarffreepascal.pas index 04c5d67f9b..1735f168ce 100644 --- a/components/fpdebug/fpdbgdwarffreepascal.pas +++ b/components/fpdebug/fpdbgdwarffreepascal.pas @@ -366,7 +366,7 @@ begin exit; // Only AnsiStrings in fpc 3.0.0 and higher have a dynamic codepage. - v := TFpDwarfFreePascalSymbolClassMapDwarf3(TypeInfo.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion; + v := TFpDwarfFreePascalSymbolClassMap(TypeInfo.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion; if (v >= $030000) then begin // Too bad the debug-information does not deliver this information. So we // use these hardcoded information, and hope that FPC does not change and @@ -2268,8 +2268,8 @@ begin exit; assert((TypeInfo <> nil) and (TypeInfo.CompilationUnit <> nil) and (TypeInfo.CompilationUnit.DwarfSymbolClassMap is TFpDwarfFreePascalSymbolClassMapDwarf3), 'TFpValueDwarfV3FreePascalString.CalcBounds: (Owner <> nil) and (Owner.CompilationUnit <> nil) and (TypeInfo.CompilationUnit.DwarfSymbolClassMap is TFpDwarfFreePascalSymbolClassMapDwarf3)'); - if (TFpDwarfFreePascalSymbolClassMapDwarf3(TypeInfo.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion > 0) and - (TFpDwarfFreePascalSymbolClassMapDwarf3(TypeInfo.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion < $030100) + if (TFpDwarfFreePascalSymbolClassMap(TypeInfo.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion > 0) and + (TFpDwarfFreePascalSymbolClassMap(TypeInfo.CompilationUnit.DwarfSymbolClassMap).FCompilerVersion < $030100) then begin if t.Kind = skWideString then begin if (t2 is TFpSymbolDwarfTypeSubRange) and (FLowBound = 1) then begin