summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-10-25 22:30:09 +0000
committerJim Ingham <jingham@apple.com>2012-10-25 22:30:09 +0000
commit4a58e968464cb345fe5dd69a1ffd2839aed128ac (patch)
treeebf4703ac246391199d09d9e6d681c5018a0acf9 /lldb/source
parent9421156acc777489bcad1b8542402e187fedc698 (diff)
downloadbcm5719-llvm-4a58e968464cb345fe5dd69a1ffd2839aed128ac.tar.gz
bcm5719-llvm-4a58e968464cb345fe5dd69a1ffd2839aed128ac.zip
Found a couple more places where we need to run all threads when stepping.
llvm-svn: 166732
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Target/ThreadPlanStepInRange.cpp15
-rw-r--r--lldb/source/Target/ThreadPlanStepInstruction.cpp6
-rw-r--r--lldb/source/Target/ThreadPlanStepOverRange.cpp2
3 files changed, 15 insertions, 8 deletions
diff --git a/lldb/source/Target/ThreadPlanStepInRange.cpp b/lldb/source/Target/ThreadPlanStepInRange.cpp
index 58fee69ff31..ca241723215 100644
--- a/lldb/source/Target/ThreadPlanStepInRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepInRange.cpp
@@ -95,14 +95,14 @@ ThreadPlanStepInRange::ShouldStop (Event *event_ptr)
}
else
{
- // Stepping through should be done stopping other threads in general, since we're setting a breakpoint and
- // continuing...
+ // Stepping through should be done running other threads in general, since we're setting a breakpoint and
+ // continuing. So only stop others if we are explicitly told to do so.
bool stop_others;
- if (m_stop_others != lldb::eAllThreads)
- stop_others = true;
- else
+ if (m_stop_others == lldb::eOnlyThisThread)
stop_others = false;
+ else
+ stop_others = true;
FrameComparison frame_order = CompareCurrentFrameToStartFrame();
@@ -291,10 +291,13 @@ ThreadPlanStepInRange::DefaultShouldStopHereCallback (ThreadPlan *current_plan,
if (should_step_out)
{
// FIXME: Make sure the ThreadPlanForStepOut does the right thing with inlined functions.
+ // We really should have all plans take the tri-state for "stop others" so we can do the right
+ // thing. For now let's be safe and always run others when we are likely to run arbitrary code.
+ const bool stop_others = false;
return current_plan->GetThread().QueueThreadPlanForStepOut (false,
NULL,
true,
- current_plan->StopOthers(),
+ stop_others,
eVoteNo,
eVoteNoOpinion,
0); // Frame index
diff --git a/lldb/source/Target/ThreadPlanStepInstruction.cpp b/lldb/source/Target/ThreadPlanStepInstruction.cpp
index a7ae41650cf..8ce527ee89c 100644
--- a/lldb/source/Target/ThreadPlanStepInstruction.cpp
+++ b/lldb/source/Target/ThreadPlanStepInstruction.cpp
@@ -131,10 +131,14 @@ ThreadPlanStepInstruction::ShouldStop (Event *event_ptr)
s.Address (return_addr, m_thread.CalculateTarget()->GetArchitecture().GetAddressByteSize());
log->Printf("%s.", s.GetData());
}
+
+ // StepInstruction should probably have the tri-state RunMode, but for now it is safer to
+ // run others.
+ const bool stop_others = false;
m_thread.QueueThreadPlanForStepOut(false,
NULL,
true,
- m_stop_other_threads,
+ stop_others,
eVoteNo,
eVoteNoOpinion,
0);
diff --git a/lldb/source/Target/ThreadPlanStepOverRange.cpp b/lldb/source/Target/ThreadPlanStepOverRange.cpp
index 5298762124a..e653e0623a8 100644
--- a/lldb/source/Target/ThreadPlanStepOverRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepOverRange.cpp
@@ -78,7 +78,7 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr)
// If we're out of the range but in the same frame or in our caller's frame
// then we should stop.
- // When stepping out we only step if we are forcing running one thread.
+ // When stepping out we only stop others if we are forcing running one thread.
bool stop_others;
if (m_stop_others == lldb::eOnlyThisThread)
stop_others = true;
OpenPOWER on IntegriCloud