Add a target setting (target.use-fast-stepping) to control using the "run to next branch" stepping algorithm.

llvm-svn: 176958
This commit is contained in:
Jim Ingham 2013-03-13 17:58:04 +00:00
parent 8a68b95d9e
commit 17d023f6ac
3 changed files with 15 additions and 2 deletions

View File

@ -145,6 +145,9 @@ public:
const char *
GetExpressionPrefixContentsAsCString ();
bool
GetUseFastStepping() const;
};
typedef STD_SHARED_PTR(TargetProperties) TargetPropertiesSP;

View File

@ -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::GetBreakpointsConsultPlatformAvoidList ()
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()
{

View File

@ -54,6 +54,7 @@ ThreadPlanStepRange::ThreadPlanStepRange (ThreadPlanKind kind,
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();
}