Debugger: add safety lock

git-svn-id: trunk@42457 -
This commit is contained in:
martin 2013-08-23 09:49:59 +00:00
parent 22aff1ece9
commit 046ae2d487

View File

@ -6056,10 +6056,15 @@ var
// TODO: move to queue
// must use none gdbmi commands
FContext.ThreadContext := ccUseGlobal;
if (not ExecuteCommand('frame %d', [i], R, [cfNoStackContext])) or (R.State = dsError)
then i := -3; // error to user
if (i < 0) or (not ExecuteCommand('break', [i], R, [cfNoStackContext])) or (R.State = dsError)
then i := -3; // error to user
FTheDebugger.QueueExecuteLock; // force queue
try
if (not ExecuteCommand('frame %d', [i], R, [cfNoStackContext])) or (R.State = dsError)
then i := -3; // error to user
if (i < 0) or (not ExecuteCommand('break', [i], R, [cfNoStackContext])) or (R.State = dsError)
then i := -3; // error to user
finally
FTheDebugger.QueueExecuteUnlock;
end;
FStepBreakPoint := StrToIntDef(GetPart(['Breakpoint '], [' at '], R.Values), -1);
if FStepBreakPoint < 0