mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-29 16:29:33 +02:00
FpDebug: PascalPrinter, Automatically deref pointers to string types. Issue #39559
This commit is contained in:
parent
c826bbf939
commit
a400e1f8c7
@ -733,6 +733,7 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
var
|
||||
s: String;
|
||||
v: QWord;
|
||||
m: TFpValue;
|
||||
begin
|
||||
if ((ADisplayFormat = wdfDefault) and (ANestLevel=0)) or // default for unested: with typename
|
||||
(ADisplayFormat = wdfStructure)
|
||||
@ -780,9 +781,17 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
if v <> 0 then
|
||||
APrintedValue := APrintedValue + '^: ' + QuoteWideText(AValue.AsWideString)
|
||||
end
|
||||
else
|
||||
if s <> '' then
|
||||
APrintedValue := s + '(' + APrintedValue + ')'; // no typeinfo for strings/pchar
|
||||
else begin
|
||||
m := AValue.Member[0];
|
||||
if (m<>nil) and (svfString in m.FieldFlags) then
|
||||
APrintedValue := APrintedValue + '^: ' + QuoteText(m.AsString)
|
||||
else
|
||||
if (m<>nil) and (svfWideString in m.FieldFlags) then
|
||||
APrintedValue := APrintedValue + '^: ' + QuoteWideText(m.AsWideString)
|
||||
else
|
||||
if s <> '' then
|
||||
APrintedValue := s + '(' + APrintedValue + ')'; // no typeinfo for strings/pchar
|
||||
end;
|
||||
|
||||
Result := True;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user