From 23a034b0333f0528b039d0df497364f1e6039ed6 Mon Sep 17 00:00:00 2001 From: martin Date: Sun, 13 Oct 2019 12:25:42 +0000 Subject: [PATCH] FpDebug: Change/Fix shortstring detection after array stride fix in fpc. (change by Issue #0036144 ) git-svn-id: trunk@62048 - --- components/fpdebug/fpdbgdwarffreepascal.pas | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/fpdebug/fpdbgdwarffreepascal.pas b/components/fpdebug/fpdbgdwarffreepascal.pas index 6b32c00c74..636651b0e1 100644 --- a/components/fpdebug/fpdbgdwarffreepascal.pas +++ b/components/fpdebug/fpdbgdwarffreepascal.pas @@ -531,6 +531,9 @@ begin if (inherited NestedSymbolCount <> 2) then exit; + if (Name <> 'ShortString') and (Name <> 'LongString') then // DWARF-2 => user types are all caps + exit; + LenSym := inherited NestedSymbolByName['length']; if (LenSym = nil) or (LenSym.Kind <> skCardinal) // or (LenSym.Size <> 1) // not implemented yet then @@ -543,11 +546,6 @@ begin if (StSymType = nil) or (StSymType.Kind <> skArray) or not (StSymType is TFpSymbolDwarfTypeArray) then exit; - // If it were a user declared array, fpc puts the stride in the subrange - if not TFpSymbolDwarfTypeArray(StSymType).InformationEntry.HasAttrib(DW_AT_byte_stride) then - exit; - // check the subrange? - FIsShortString := issShortString; Result := True; end;