summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBThread.cpp27
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp21
-rw-r--r--lldb/source/Target/Thread.cpp31
3 files changed, 39 insertions, 40 deletions
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index f0cc46d7bd8..a220cd85a3a 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -325,7 +325,8 @@ SBThread::StepOver (lldb::RunMode stop_other_threads)
eStepTypeOver,
sc.line_entry.range,
sc,
- stop_other_threads);
+ stop_other_threads,
+ false);
}
else
@@ -354,24 +355,14 @@ SBThread::StepInto (lldb::RunMode stop_other_threads)
if (frame_sp && frame_sp->HasDebugInformation ())
{
+ bool avoid_code_without_debug_info = true;
SymbolContext sc(frame_sp->GetSymbolContext(eSymbolContextEverything));
- ThreadPlan *new_plan = m_lldb_object_sp->QueueThreadPlanForStepRange (abort_other_plans,
- eStepTypeInto,
- sc.line_entry.range,
- sc,
- stop_other_threads);
- if (new_plan)
- {
- ThreadPlanStepInRange *real_plan = dynamic_cast<ThreadPlanStepInRange *> (new_plan);
- if (real_plan)
- {
- bool avoid_no_debug = true;
- if (avoid_no_debug)
- real_plan->GetFlags().Set (ThreadPlanShouldStopHere::eAvoidNoDebug);
- else
- real_plan->GetFlags().Clear (ThreadPlanShouldStopHere::eAvoidNoDebug);
- }
- }
+ m_lldb_object_sp->QueueThreadPlanForStepRange (abort_other_plans,
+ eStepTypeInto,
+ sc.line_entry.range,
+ sc,
+ stop_other_threads,
+ avoid_code_without_debug_info);
}
else
{
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 07777a19cfe..0cc326f5f45 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -512,22 +512,8 @@ public:
new_plan = thread->QueueThreadPlanForStepRange (abort_other_plans, m_step_type,
frame->GetSymbolContext(eSymbolContextEverything).line_entry.range,
frame->GetSymbolContext(eSymbolContextEverything),
- stop_other_threads);
- if (new_plan)
- {
- ThreadPlanStepInRange *real_plan = dynamic_cast<ThreadPlanStepInRange *> (new_plan);
- if (real_plan)
- {
- if (m_options.m_avoid_no_debug)
- {
- real_plan->GetFlags().Set (ThreadPlanShouldStopHere::eAvoidNoDebug);
- }
- else
- {
- real_plan->GetFlags().Clear (ThreadPlanShouldStopHere::eAvoidNoDebug);
- }
- }
- }
+ stop_other_threads,
+ m_options.m_avoid_no_debug);
}
else
new_plan = thread->QueueThreadPlanForStepSingleInstruction (false, abort_other_plans, bool_stop_other_threads);
@@ -545,7 +531,8 @@ public:
m_step_type,
frame->GetSymbolContext(eSymbolContextEverything).line_entry.range,
frame->GetSymbolContext(eSymbolContextEverything),
- stop_other_threads);
+ stop_other_threads,
+ false);
else
new_plan = thread->QueueThreadPlanForStepSingleInstruction (true,
abort_other_plans,
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index 2f852cc3eae..068cc392f7d 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -419,9 +419,15 @@ Thread::SetupForResume ()
// Note, don't assume there's a ThreadPlanStepOverBreakpoint, the target may not require anything
// special to step over a breakpoint.
- ThreadPlan *cur_plan = GetCurrentPlan();
- ThreadPlanStepOverBreakpoint *step_over_bp = dynamic_cast<ThreadPlanStepOverBreakpoint *> (cur_plan);
- if (step_over_bp == NULL)
+ // TODO: Jim Ingham -- this is the only place left that does RTTI in
+ // all of LLDB. I am adding a hack right now to let us compile
+ // without RTTI, but we will need to look at and fix this. Right
+ // now it will always push the breakpoint thread plan which is
+ // probably wrong. We will need to work around this.
+
+// ThreadPlan *cur_plan = GetCurrentPlan();
+// ThreadPlanStepOverBreakpoint *step_over_bp = dynamic_cast<ThreadPlanStepOverBreakpoint *> (cur_plan);
+// if (step_over_bp == NULL)
{
ThreadPlanSP step_bp_plan_sp (new ThreadPlanStepOverBreakpoint (*this));
@@ -861,11 +867,26 @@ Thread::QueueThreadPlanForStepSingleInstruction (bool step_over, bool abort_othe
}
ThreadPlan *
-Thread::QueueThreadPlanForStepRange (bool abort_other_plans, StepType type, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_other_threads)
+Thread::QueueThreadPlanForStepRange
+(
+ bool abort_other_plans,
+ StepType type,
+ const AddressRange &range,
+ const SymbolContext &addr_context,
+ lldb::RunMode stop_other_threads,
+ bool avoid_code_without_debug_info
+)
{
ThreadPlanSP thread_plan_sp;
if (type == eStepTypeInto)
- thread_plan_sp.reset (new ThreadPlanStepInRange (*this, range, addr_context, stop_other_threads));
+ {
+ ThreadPlanStepInRange *plan = new ThreadPlanStepInRange (*this, range, addr_context, stop_other_threads);
+ if (avoid_code_without_debug_info)
+ plan->GetFlags().Set (ThreadPlanShouldStopHere::eAvoidNoDebug);
+ else
+ plan->GetFlags().Clear (ThreadPlanShouldStopHere::eAvoidNoDebug);
+ thread_plan_sp.reset (plan);
+ }
else
thread_plan_sp.reset (new ThreadPlanStepOverRange (*this, range, addr_context, stop_other_threads));
OpenPOWER on IntegriCloud