FpGdbmiDebugger: deal with watches if result is type instead of value

git-svn-id: trunk@44907 -
This commit is contained in:
martin 2014-05-04 16:51:01 +00:00
parent c700bfe172
commit a2a5fab89e

View File

@ -939,6 +939,7 @@ var
s: String;
DispFormat: TWatchDisplayFormat;
RepeatCnt: Integer;
TiSym: TFpDbgSymbol;
function IsWatchValueAlive: Boolean;
begin
@ -1188,6 +1189,23 @@ DebugLn(ErrorHandler.ErrorAsString(PasExpr.Error));
skClass: DoClass;
skInterface: ;
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;
if not IsWatchValueAlive then exit;