DBG: User-Feedback for watchpoint errors

git-svn-id: trunk@32830 -
This commit is contained in:
martin 2011-10-11 23:24:09 +00:00
parent a46dcdb4d8
commit 5bdf949df0

View File

@ -4785,11 +4785,11 @@ end;
{$ENDIF} {$ENDIF}
function TGDBMIDebuggerCommandExecute.DoExecute: Boolean; function TGDBMIDebuggerCommandExecute.DoExecute: Boolean;
const
BreaKErrMsg = 'not insert breakpoint ';
WatchErrMsg = 'not insert hardware watchpoint ';
function HandleBreakPointError(var ARes: TGDBMIExecResult; AError: String): Boolean; function HandleBreakPointError(var ARes: TGDBMIExecResult; AError: String): Boolean;
const
BreaKErrMsg = 'not insert breakpoint ';
WatchErrMsg = 'not insert hardware watchpoint ';
function ErrPos(s: string): integer; function ErrPos(s: string): integer;
var var
@ -4882,8 +4882,10 @@ function TGDBMIDebuggerCommandExecute.DoExecute: Boolean;
SetDebuggerState(dsError); SetDebuggerState(dsError);
exit; exit;
end; end;
if (Pos('Cannot insert breakpoint', ARes.Values) > 0) or if (Pos(BreaKErrMsg, ARes.Values) > 0) or
(Pos('Cannot insert breakpoint', FLogWarnings) > 0) (Pos(BreaKErrMsg, FLogWarnings) > 0) or
(Pos(WatchErrMsg, ARes.Values) > 0) or
(Pos(WatchErrMsg, FLogWarnings) > 0)
then begin then begin
Result := HandleBreakPointError(ARes, ARes.Values + FLogWarnings); Result := HandleBreakPointError(ARes, ARes.Values + FLogWarnings);
if Result then exit; if Result then exit;