* Reset a breakpoint after hitting it

git-svn-id: trunk@44605 -
This commit is contained in:
joost 2014-04-04 20:17:17 +00:00
parent 69938aa78b
commit e6983321d8

View File

@ -164,6 +164,7 @@ begin
begin begin
Log('Failed to call thread_set_state for thread %d. Mach error: '+mach_error_string(aKernResult),[Id]); Log('Failed to call thread_set_state for thread %d. Mach error: '+mach_error_string(aKernResult),[Id]);
end; end;
result := true;
end; end;
{ TDbgDarwinProcess } { TDbgDarwinProcess }
@ -369,7 +370,7 @@ begin
fpPTrace(PTRACE_CONT, ProcessID, nil, nil); fpPTrace(PTRACE_CONT, ProcessID, nil, nil);
{$endif linux} {$endif linux}
{$ifdef darwin} {$ifdef darwin}
if AThread.SingleStepping then if (AThread.SingleStepping) or assigned(FCurrentBreakpoint) then
fpPTrace(PTRACE_SINGLESTEP, ProcessID, pointer(1), nil) fpPTrace(PTRACE_SINGLESTEP, ProcessID, pointer(1), nil)
else if FIsTerminating then else if FIsTerminating then
fpPTrace(PTRACE_KILL, ProcessID, pointer(1), nil) fpPTrace(PTRACE_KILL, ProcessID, pointer(1), nil)
@ -447,6 +448,12 @@ begin
result := deCreateProcess; result := deCreateProcess;
FProcessStarted:=true; FProcessStarted:=true;
end end
else if assigned(FCurrentBreakpoint) then
begin
FCurrentBreakpoint.SetBreak;
FCurrentBreakpoint:=nil;
result := deInternalContinue;
end
else else
begin begin
result := deBreakpoint; result := deBreakpoint;