* Some minor debugger updates
  + Added evaluate to debugboss
  + Added hint debug evaluation

git-svn-id: trunk@3610 -
This commit is contained in:
lazarus 2002-11-05 22:41:13 +00:00
parent 24aa6bc959
commit d04ad31287

View File

@ -73,6 +73,9 @@ type
procedure DebugDialogDestroy(Sender: TObject); procedure DebugDialogDestroy(Sender: TObject);
procedure ViewDebugDialog(const ADialogType: TDebugDialogType); procedure ViewDebugDialog(const ADialogType: TDebugDialogType);
procedure DestroyDebugDialog(const ADialogType: TDebugDialogType); procedure DestroyDebugDialog(const ADialogType: TDebugDialogType);
protected
function GetState: TDBGState; override;
function GetCommands: TDBGCommands; override;
public public
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
destructor Destroy; override; destructor Destroy; override;
@ -89,6 +92,8 @@ type
procedure RunDebugger; override; procedure RunDebugger; override;
procedure EndDebugging; override; procedure EndDebugging; override;
function Evaluate(const AExpression: String; var AResult: String): Boolean; override;
end; end;
@ -207,9 +212,21 @@ begin
ToolStatus := TOOLSTATEMAP[FDebugger.State]; ToolStatus := TOOLSTATEMAP[FDebugger.State];
end; end;
if FDebugger.State = dsError case FDebugger.State of
then begin dsError: begin
WriteLN('Ooops, the debugger entered the error state'); WriteLN('Ooops, the debugger entered the error state');
MessageDlg('Debugger error',
'Debugger error'#13#13 +
'Ooops, the debugger entered the error state'#13 +
'Save your work now !'#13#13 +
'Hit Stop, and hope the best, we''re pulling the plug.',
mtError, [mbOK],0);
end;
dsStop: begin
MessageDlg('Execution stopped',
'Execution stopped'#13#13,
mtInformation, [mbOK],0);
end;
end; end;
end; end;
@ -596,6 +613,13 @@ begin
if FDebugger <> nil then FDebugger.Done; if FDebugger <> nil then FDebugger.Done;
end; end;
function TDebugManager.Evaluate(const AExpression: String; var AResult: String): Boolean;
begin
Result := (MainIDE.ToolStatus = itDebugger)
and (FDebugger <> nil)
and FDebugger.Evaluate(AExpression, AResult);
end;
function TDebugManager.DoRunToCursor: TModalResult; function TDebugManager.DoRunToCursor: TModalResult;
var var
ActiveSrcEdit: TSourceEditor; ActiveSrcEdit: TSourceEditor;
@ -629,10 +653,30 @@ begin
Result := mrOK; Result := mrOK;
end; end;
function TDebugManager.GetState: TDBGState;
begin
if FDebugger = nil
then Result := dsNone
else Result := FDebugger.State;
end;
function TDebugManager.GetCommands: TDBGCommands;
begin
if FDebugger = nil
then Result := []
else Result := FDebugger.Commands;
end;
end. end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.9 2002/11/05 22:41:13 lazarus
MWE:
* Some minor debugger updates
+ Added evaluate to debugboss
+ Added hint debug evaluation
Revision 1.8 2002/10/02 00:17:03 lazarus Revision 1.8 2002/10/02 00:17:03 lazarus
MWE: MWE:
+ Honoured the ofQuiet flag in DoOpenNotExistingFile, so custom messages + Honoured the ofQuiet flag in DoOpenNotExistingFile, so custom messages