When constructing an address range to "step" or "next" through,
find the largest address range (possibly combining multiple
LineEntry's for this line number) that is contiguous.
This allows lldb's fast-step stepping algorithm to potentially
run for a longer address range than if we have to stop at every
LineEntry indicating a subexpression in the source line.
http://reviews.llvm.org/D15407
<rdar://problem/23270882>
llvm-svn: 255590
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index 6299436..fab5afc 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -1535,6 +1535,21 @@
return thread_plan_sp;
}
+// Call the QueueThreadPlanForStepOverRange method which takes an address range.
+ThreadPlanSP
+Thread::QueueThreadPlanForStepOverRange(bool abort_other_plans,
+ const LineEntry &line_entry,
+ const SymbolContext &addr_context,
+ lldb::RunMode stop_other_threads,
+ LazyBool step_out_avoids_code_withoug_debug_info)
+{
+ return QueueThreadPlanForStepOverRange (abort_other_plans,
+ line_entry.GetSameLineContiguousAddressRange(),
+ addr_context,
+ stop_other_threads,
+ step_out_avoids_code_withoug_debug_info);
+}
+
ThreadPlanSP
Thread::QueueThreadPlanForStepInRange(bool abort_other_plans,
const AddressRange &range,
@@ -1559,6 +1574,26 @@
return thread_plan_sp;
}
+// Call the QueueThreadPlanForStepInRange method which takes an address range.
+ThreadPlanSP
+Thread::QueueThreadPlanForStepInRange(bool abort_other_plans,
+ const LineEntry &line_entry,
+ const SymbolContext &addr_context,
+ const char *step_in_target,
+ lldb::RunMode stop_other_threads,
+ LazyBool step_in_avoids_code_without_debug_info,
+ LazyBool step_out_avoids_code_without_debug_info)
+{
+ return QueueThreadPlanForStepInRange (abort_other_plans,
+ line_entry.GetSameLineContiguousAddressRange(),
+ addr_context,
+ step_in_target,
+ stop_other_threads,
+ step_in_avoids_code_without_debug_info,
+ step_out_avoids_code_without_debug_info);
+}
+
+
ThreadPlanSP
Thread::QueueThreadPlanForStepOut(bool abort_other_plans,
SymbolContext *addr_context,
@@ -2374,7 +2409,7 @@
{
SymbolContext sc(frame_sp->GetSymbolContext(eSymbolContextEverything));
new_plan_sp = QueueThreadPlanForStepInRange (abort_other_plans,
- sc.line_entry.range,
+ sc.line_entry,
sc,
NULL,
run_mode,
@@ -2420,7 +2455,7 @@
{
SymbolContext sc(frame_sp->GetSymbolContext(eSymbolContextEverything));
new_plan_sp = QueueThreadPlanForStepOverRange (abort_other_plans,
- sc.line_entry.range,
+ sc.line_entry,
sc,
run_mode,
step_out_avoids_code_without_debug_info);