mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-26 23:36:18 +02:00
LazDebuggerFp: Fix, showing pchar and string version for index access of string/pchar
git-svn-id: trunk@59862 -
This commit is contained in:
parent
53ff21a2b4
commit
e74b00e9dc
@ -1334,7 +1334,7 @@ var
|
|||||||
StackFrame, ThreadId: Integer;
|
StackFrame, ThreadId: Integer;
|
||||||
StackList: TCallStackBase;
|
StackList: TCallStackBase;
|
||||||
ResValue: TFpDbgValue;
|
ResValue: TFpDbgValue;
|
||||||
CastName: String;
|
CastName, ResText2: String;
|
||||||
ClassAddr, CNameAddr: TFpDbgMemLocation;
|
ClassAddr, CNameAddr: TFpDbgMemLocation;
|
||||||
NameLen: QWord;
|
NameLen: QWord;
|
||||||
begin
|
begin
|
||||||
@ -1420,7 +1420,18 @@ begin
|
|||||||
Res := FPrettyPrinter.PrintValue(AResText, APasExpr.ResultValue, DispFormat, RepeatCnt)
|
Res := FPrettyPrinter.PrintValue(AResText, APasExpr.ResultValue, DispFormat, RepeatCnt)
|
||||||
else
|
else
|
||||||
Res := FPrettyPrinter.PrintValue(AResText, ATypeInfo, APasExpr.ResultValue, DispFormat, RepeatCnt);
|
Res := FPrettyPrinter.PrintValue(AResText, ATypeInfo, APasExpr.ResultValue, DispFormat, RepeatCnt);
|
||||||
// TODO: PCHAR/String
|
|
||||||
|
// PCHAR/String
|
||||||
|
if APasExpr.HasPCharIndexAccess then begin
|
||||||
|
// TODO: Only dwarf 2
|
||||||
|
APasExpr.FixPCharIndexAccess := True;
|
||||||
|
APasExpr.ResetEvaluation;
|
||||||
|
ResValue := APasExpr.ResultValue;
|
||||||
|
if (ResValue=nil) or (not FPrettyPrinter.PrintValue(ResText2, ResValue, DispFormat, RepeatCnt)) then
|
||||||
|
ResText2 := 'Failed';
|
||||||
|
AResText := 'PChar: '+AResText+ LineEnding + 'String: '+ResText2;
|
||||||
|
end;
|
||||||
|
|
||||||
if Res then
|
if Res then
|
||||||
begin
|
begin
|
||||||
if AWatchValue <> nil then
|
if AWatchValue <> nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user