From 0368d8e0d83881ca3fdf913a103b63d65db2fe41 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 13 Nov 2018 11:48:38 +0000 Subject: [PATCH] FpDebug: temporary workaround to display widestrings (actually pwidechar^) git-svn-id: trunk@59538 - --- components/fpdebug/fpdbgdwarf.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/fpdebug/fpdbgdwarf.pas b/components/fpdebug/fpdbgdwarf.pas index d7a55f34bf..0d750ab182 100644 --- a/components/fpdebug/fpdbgdwarf.pas +++ b/components/fpdebug/fpdbgdwarf.pas @@ -1941,7 +1941,10 @@ begin while (i > 0) and (not MemManager.ReadMemory(DataAddress, 2000, @Result[1])) do i := i div 2; SetLength(Result,i); - i := pos(#0, Result); + if t.Size = 2 then // widestring + i := pos(#0#0, Result) + else + i := pos(#0, Result); if i > 0 then SetLength(Result,i-1); exit; @@ -3279,6 +3282,7 @@ begin DW_ATE_signed_char: SetKind(skChar); DW_ATE_unsigned: SetKind(skCardinal); DW_ATE_unsigned_char: SetKind(skChar); + DW_ATE_numeric_string:SetKind(skChar); // temporary for widestring else begin DebugLn(FPDBG_DWARF_WARNINGS, ['TFpDwarfSymbolTypeBasic.KindNeeded: Unknown encoding ', DwarfBaseTypeEncodingToString(Encoding), ' for ', DwarfTagToString(InformationEntry.AbbrevTag)]);