[Lldb-commits] [lldb] r176958 - Add a target setting (target.use-fast-stepping) to control using the "run to next branch" stepping algorithm.
Jim Ingham
jingham at apple.com
Wed Mar 13 10:58:04 PDT 2013
Author: jingham
Date: Wed Mar 13 12:58:04 2013
New Revision: 176958
URL: http://llvm.org/viewvc/llvm-project?rev=176958&view=rev
Log:
Add a target setting (target.use-fast-stepping) to control using the "run to next branch" stepping algorithm.
Modified:
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/source/Target/Target.cpp
lldb/trunk/source/Target/ThreadPlanStepRange.cpp
Modified: lldb/trunk/include/lldb/Target/Target.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=176958&r1=176957&r2=176958&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Wed Mar 13 12:58:04 2013
@@ -144,7 +144,10 @@ public:
const char *
GetExpressionPrefixContentsAsCString ();
-
+
+ bool
+ GetUseFastStepping() const;
+
};
typedef STD_SHARED_PTR(TargetProperties) TargetPropertiesSP;
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=176958&r1=176957&r2=176958&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Wed Mar 13 12:58:04 2013
@@ -2261,6 +2261,7 @@ g_properties[] =
"file and line breakpoints." },
// FIXME: This is the wrong way to do per-architecture settings, but we don't have a general per architecture settings system in place yet.
{ "x86-disassembly-flavor" , OptionValue::eTypeEnum , false, eX86DisFlavorDefault, NULL, g_x86_dis_flavor_value_types, "The default disassembly flavor to use for x86 or x86-64 targets." },
+ { "use-fast-stepping" , OptionValue::eTypeBoolean , false, false, NULL, NULL, "Use a fast stepping algorithm based on running from branch to branch rather than instruction single-stepping." },
{ NULL , OptionValue::eTypeInvalid , false, 0 , NULL, NULL, NULL }
};
enum
@@ -2285,7 +2286,8 @@ enum
ePropertyDisableASLR,
ePropertyDisableSTDIO,
ePropertyInlineStrategy,
- ePropertyDisassemblyFlavor
+ ePropertyDisassemblyFlavor,
+ ePropertyUseFastStepping
};
@@ -2624,6 +2626,13 @@ TargetProperties::GetBreakpointsConsultP
return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0);
}
+bool
+TargetProperties::GetUseFastStepping () const
+{
+ const uint32_t idx = ePropertyUseFastStepping;
+ return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0);
+}
+
const TargetPropertiesSP &
Target::GetGlobalProperties()
{
Modified: lldb/trunk/source/Target/ThreadPlanStepRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepRange.cpp?rev=176958&r1=176957&r2=176958&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepRange.cpp Wed Mar 13 12:58:04 2013
@@ -54,6 +54,7 @@ ThreadPlanStepRange::ThreadPlanStepRange
m_first_run_event (true),
m_use_fast_step(false)
{
+ m_use_fast_step = GetTarget().GetUseFastStepping();
AddRange(range);
m_stack_id = m_thread.GetStackFrameAtIndex(0)->GetStackID();
}
More information about the lldb-commits
mailing list