mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 17:59:16 +02:00
FpGdbmiDebugger: deal with watches if result is type instead of value
git-svn-id: trunk@44907 -
This commit is contained in:
parent
c700bfe172
commit
a2a5fab89e
@ -939,6 +939,7 @@ var
|
|||||||
s: String;
|
s: String;
|
||||||
DispFormat: TWatchDisplayFormat;
|
DispFormat: TWatchDisplayFormat;
|
||||||
RepeatCnt: Integer;
|
RepeatCnt: Integer;
|
||||||
|
TiSym: TFpDbgSymbol;
|
||||||
|
|
||||||
function IsWatchValueAlive: Boolean;
|
function IsWatchValueAlive: Boolean;
|
||||||
begin
|
begin
|
||||||
@ -1188,6 +1189,23 @@ DebugLn(ErrorHandler.ErrorAsString(PasExpr.Error));
|
|||||||
skClass: DoClass;
|
skClass: DoClass;
|
||||||
skInterface: ;
|
skInterface: ;
|
||||||
skArray: DoArray;
|
skArray: DoArray;
|
||||||
|
skNone: begin
|
||||||
|
// maybe type
|
||||||
|
TiSym := ResValue.DbgSymbol;
|
||||||
|
if (TiSym <> nil) and (TiSym.SymbolType = stType) then begin
|
||||||
|
if GetTypeAsDeclaration(AResText, TiSym) then
|
||||||
|
AResText := Format('{Type=} %1s', [AResText])
|
||||||
|
else
|
||||||
|
if GetTypeName(AResText, TiSym) then
|
||||||
|
AResText := Format('{Type=} %1s', [AResText])
|
||||||
|
else
|
||||||
|
AResText := '{Type=} unknown';
|
||||||
|
Result := True;
|
||||||
|
AWatchValue.Value := AResText;
|
||||||
|
AWatchValue.Validity := ddsValid; // TODO ddsError ?
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
if not IsWatchValueAlive then exit;
|
if not IsWatchValueAlive then exit;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user