mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 05:19:10 +02:00
DBG: Added interface fer testing/developing new dbg features
git-svn-id: trunk@37510 -
This commit is contained in:
parent
014abf4fd3
commit
881e5cb6d1
@ -12106,8 +12106,6 @@ var
|
||||
SetLength(Result, j + 1);
|
||||
end;
|
||||
|
||||
function TryExecute(AnExpression: string): Boolean;
|
||||
|
||||
procedure ParseLastError;
|
||||
var
|
||||
ResultList: TGDBMINameValueList;
|
||||
@ -12126,6 +12124,8 @@ var
|
||||
FValidity := ddsError;
|
||||
end;
|
||||
|
||||
function TryExecute(AnExpression: string): Boolean;
|
||||
|
||||
function PrepareExpr(var expr: string; NoAddressOp: Boolean = False): boolean;
|
||||
begin
|
||||
Assert(FTypeInfo = nil, 'Type info must be nil');
|
||||
@ -12316,6 +12316,7 @@ var
|
||||
ResultList: TGDBMINameValueList;
|
||||
Expr: TGDBMIExpression;
|
||||
frameidx: Integer;
|
||||
{$IFDEF DBG_WITH_GDB_WATCHES} R: TGDBMIExecResult; {$ENDIF}
|
||||
begin
|
||||
if not SelectContext then begin
|
||||
FTextValue:='<Error>';
|
||||
@ -12347,6 +12348,28 @@ begin
|
||||
Exit(True);
|
||||
end;
|
||||
|
||||
{$IFDEF DBG_WITH_GDB_WATCHES}
|
||||
(* This code is experimental. No support will be provided.
|
||||
It is intended for people extending the GDBMI classes of the IDE, and requires deep knowledge on how the IDE works.
|
||||
WARNING:
|
||||
- This bypasses some of the internals of the debugger.
|
||||
- It does intentionally no check or validation
|
||||
- Using this feature without full knowledge of all internals of the debugger, can *HANG* or *CRASH* the debugger or the entire IDE.
|
||||
*)
|
||||
if S[1]='>' then begin // raw cli commands
|
||||
delete(S,1,1);
|
||||
Result := ExecuteCommand('%s', [S], R);
|
||||
Result := Result and (R.State <> dsError);
|
||||
if (not Result) then begin
|
||||
ParseLastError;
|
||||
exit;
|
||||
end;
|
||||
FValidity := ddsValid;
|
||||
FTextValue := UnEscapeBackslashed(R.Values, [uefNewLine, uefTab], 3);
|
||||
exit;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
ResultList := TGDBMINameValueList.Create('');
|
||||
// keep the internal stackframe => same as requested by watch
|
||||
frameidx := TGDBMIDebugger(FTheDebugger).FInternalStackFrame;
|
||||
|
Loading…
Reference in New Issue
Block a user