diff options
author | Jim Ingham <jingham@apple.com> | 2012-04-20 21:16:56 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-04-20 21:16:56 +0000 |
commit | 6d66ce67d75ec2dbc42d028084ab0801c1f4fcd6 (patch) | |
tree | bb24a8c6ac14f96ff77622db1e6cd0015900f2d5 /lldb/source/Target/Thread.cpp | |
parent | 1b42280917638c00f5e7012383627966b682ee30 (diff) | |
download | bcm5719-llvm-6d66ce67d75ec2dbc42d028084ab0801c1f4fcd6.tar.gz bcm5719-llvm-6d66ce67d75ec2dbc42d028084ab0801c1f4fcd6.zip |
Make sure the "synchronous breakpoint callbacks" get called before the thread plan logic gets invoked, and if they
ask to continue that should short-circuit the thread plans for that thread. Also add a bit more explanation for
how this machinery is supposed to work.
Also pass eExecutionPolicyOnlyWhenNeeded, not eExecutionPolicyAlways when evaluating the expression for breakpoint
conditions.
llvm-svn: 155236
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r-- | lldb/source/Target/Thread.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index c483e5ae3da..7445ffc06f2 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -333,6 +333,17 @@ Thread::ShouldStop (Event* event_ptr) // The top most plan always gets to do the trace log... current_plan->DoTraceLog (); + + // First query the stop info's ShouldStopSynchronous. This handles "synchronous" stop reasons, for example the breakpoint + // command on internal breakpoints. If a synchronous stop reason says we should not stop, then we don't have to + // do any more work on this stop. + StopInfoSP private_stop_info (GetPrivateStopReason()); + if (private_stop_info && private_stop_info->ShouldStopSynchronous(event_ptr) == false) + { + if (log) + log->Printf ("StopInfo::ShouldStop async callback says we should not stop, returning ShouldStop of false."); + return false; + } // If the base plan doesn't understand why we stopped, then we have to find a plan that does. // If that plan is still working, then we don't need to do any more work. If the plan that explains |