summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-02-28 02:52:06 +0000
committerJim Ingham <jingham@apple.com>2014-02-28 02:52:06 +0000
commit286fb1ef32243f29c984b4559b1a1207c8af96cd (patch)
treebc39f81d73c8031654444ef231eb5ffae1d0728d
parenta51f0f8367acb79177abfb93e5b3533b490448cf (diff)
downloadbcm5719-llvm-286fb1ef32243f29c984b4559b1a1207c8af96cd.tar.gz
bcm5719-llvm-286fb1ef32243f29c984b4559b1a1207c8af96cd.zip
Plumb the EvaluateExpressionOptions::{Set,Get}StopOthers through the SB API, and make it work in RunThreadPlan.
Also remove SetStopOthers from the ThreadPlanCallFunction, because if the value you have doesn't match what is in the EvaluateExpressionOptions the plan was passed when created it won't work correctly. llvm-svn: 202464
-rw-r--r--lldb/include/lldb/API/SBExpressionOptions.h6
-rw-r--r--lldb/include/lldb/Target/ThreadPlanCallFunction.h3
-rw-r--r--lldb/scripts/Python/interface/SBExpressionOptions.i7
-rw-r--r--lldb/source/API/SBExpressionOptions.cpp12
-rw-r--r--lldb/source/Target/Process.cpp7
-rw-r--r--lldb/source/Target/ThreadPlanCallFunction.cpp11
6 files changed, 31 insertions, 15 deletions
diff --git a/lldb/include/lldb/API/SBExpressionOptions.h b/lldb/include/lldb/API/SBExpressionOptions.h
index 6a3a640432f..ac5ce952a62 100644
--- a/lldb/include/lldb/API/SBExpressionOptions.h
+++ b/lldb/include/lldb/API/SBExpressionOptions.h
@@ -64,6 +64,12 @@ public:
void
SetTryAllThreads (bool run_others = true);
+
+ bool
+ GetStopOthers() const;
+
+ void
+ SetStopOthers(bool stop_others = true);
bool
GetTrapExceptions () const;
diff --git a/lldb/include/lldb/Target/ThreadPlanCallFunction.h b/lldb/include/lldb/Target/ThreadPlanCallFunction.h
index 18f1d0facbf..d8d8cb19dfa 100644
--- a/lldb/include/lldb/Target/ThreadPlanCallFunction.h
+++ b/lldb/include/lldb/Target/ThreadPlanCallFunction.h
@@ -52,9 +52,6 @@ public:
virtual bool
StopOthers ();
- virtual void
- SetStopOthers (bool new_value);
-
virtual lldb::StateType
GetPlanRunState ();
diff --git a/lldb/scripts/Python/interface/SBExpressionOptions.i b/lldb/scripts/Python/interface/SBExpressionOptions.i
index 06b9be310de..28541084197 100644
--- a/lldb/scripts/Python/interface/SBExpressionOptions.i
+++ b/lldb/scripts/Python/interface/SBExpressionOptions.i
@@ -72,6 +72,13 @@ public:
SetTryAllThreads (bool run_others = true);
bool
+ GetStopOthers () const;
+
+ %feature("docstring", "Sets whether to stop other threads at all while running expressins. If false, TryAllThreads does nothing.") SetTryAllThreads;
+ void
+ SetStopOthers (bool stop_others = true);
+
+ bool
GetTrapExceptions () const;
%feature("docstring", "Sets whether to abort expression evaluation if an exception is thrown while executing. Don't set this to false unless you know the function you are calling traps all exceptions itself.") SetTryAllThreads;
diff --git a/lldb/source/API/SBExpressionOptions.cpp b/lldb/source/API/SBExpressionOptions.cpp
index ae1c8f99df3..b426cd1845f 100644
--- a/lldb/source/API/SBExpressionOptions.cpp
+++ b/lldb/source/API/SBExpressionOptions.cpp
@@ -114,6 +114,18 @@ SBExpressionOptions::SetTryAllThreads (bool run_others)
}
bool
+SBExpressionOptions::GetStopOthers () const
+{
+ return m_opaque_ap->GetStopOthers ();
+}
+
+void
+SBExpressionOptions::SetStopOthers (bool run_others)
+{
+ m_opaque_ap->SetStopOthers (run_others);
+}
+
+bool
SBExpressionOptions::GetTrapExceptions () const
{
return m_opaque_ap->GetTrapExceptions ();
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 7a7172fa5c1..b7879028514 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -5118,7 +5118,12 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
TimeValue final_timeout = one_thread_timeout;
uint32_t timeout_usec = options.GetTimeoutUsec();
- if (options.GetTryAllThreads())
+ if (!options.GetStopOthers())
+ {
+ before_first_timeout = false;
+ final_timeout.OffsetWithMicroSeconds(timeout_usec);
+ }
+ else if (options.GetTryAllThreads())
{
// If we are running all threads then we take half the time to run all threads, bounded by
// .25 sec.
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp
index 854750b8581..e465dcf21d7 100644
--- a/lldb/source/Target/ThreadPlanCallFunction.cpp
+++ b/lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -425,17 +425,6 @@ ThreadPlanCallFunction::StopOthers ()
return m_stop_other_threads;
}
-void
-ThreadPlanCallFunction::SetStopOthers (bool new_value)
-{
- if (m_subplan_sp)
- {
- ThreadPlanRunToAddress *address_plan = static_cast<ThreadPlanRunToAddress *>(m_subplan_sp.get());
- address_plan->SetStopOthers(new_value);
- }
- m_stop_other_threads = new_value;
-}
-
StateType
ThreadPlanCallFunction::GetPlanRunState ()
{
OpenPOWER on IntegriCloud