MWE: + Added initial signal and exception handling

git-svn-id: trunk@3130 -
This commit is contained in:
marc 2002-08-18 08:57:48 +00:00
parent 9b2aa2ff7e
commit 129560e5f4

View File

@ -63,6 +63,7 @@ type
FExceptionBreakID: Integer;
FVersion: String;
FPauseWaitState: TGDBMIPauseWaitState;
FInExecuteCount: Integer;
// Implementation of external functions
function GDBEvaluate(const AExpression: String; var AResult: String): Boolean;
function GDBRun: Boolean;
@ -469,8 +470,9 @@ begin
// If we are here we can process the command directly
Result := True;
FirstCmd := True;
FPauseWaitState := pwsNone;
repeat
Inc(FInExecuteCount);
try
ResultValues := '';
ResultState := dsNone;
@ -494,6 +496,9 @@ begin
if ResultState = dsRun
then R := ProcessRunning(StoppedParams);
// Delete command first to allow GDB access while processing stopped
FCommandQueue.Delete(0);
if StoppedParams <> ''
then ProcessStopped(StoppedParams, FPauseWaitState = pwsInternal);
@ -501,7 +506,6 @@ begin
then CmdInfo^.Callback(ResultState, ResultValues, 0);
Dispose(CmdInfo);
FCommandQueue.Delete(0);
if FirstCmd
then begin
@ -509,10 +513,14 @@ begin
AResultValues := ResultValues;
AResultState := ResultState;
end;
finally
Dec(FInExecuteCount);
end;
if FCommandQueue.Count = 0
then begin
if (FPauseWaitState = pwsInternal)
if (FInExecuteCount = 0)
and (FPauseWaitState = pwsInternal)
and (State = dsRun)
then begin
// reset state
@ -749,6 +757,9 @@ procedure TGDBMIDebugger.Init;
var
Line, S: String;
begin
FPauseWaitState := pwsNone;
FInExecuteCount := 0;
if CreateDebugProcess('-silent -i mi')
then begin
// Get initial debugger lines
@ -992,6 +1003,13 @@ function TGDBMIDebugger.ProcessStopped(const AParams: String; const AIgnoreSigIn
ResultList.Free;
end;
// check if we should ignore this exception
if Exceptions.Find(ExceptionName) <> nil
then begin
ExecuteCommand('-exec-continue', []);
Exit;
end;
if CompactMode
then begin
ExceptionMessage := GetText('^^Exception($fp+8)^^.FMessage', []);
@ -1942,6 +1960,9 @@ end;
end.
{ =============================================================================
$Log$
Revision 1.30 2003/06/13 19:21:31 marc
MWE: + Added initial signal and exception handling
Revision 1.29 2003/06/10 23:48:26 marc
MWE: * Enabled modification of breakpoints while running