Dynamic values have been around (and stable and reliable) for long enough that we can turn them on by default

Change the default of prefer-dynamic-value to eDynamicDontRunTarget (i.e. enable dynamic values, but do not run code to do so)

Of course, disable this for the test suite, since testing no-dynamic-values is actually valuable

Fixes rdar://17363061

llvm-svn: 225486
This commit is contained in:
Enrico Granata
2015-01-09 00:47:24 +00:00
parent 33ead6f901
commit 9aa7e8e9ff
2 changed files with 11 additions and 1 deletions

View File

@@ -2745,7 +2745,7 @@ g_properties[] =
{
{ "default-arch" , OptionValue::eTypeArch , true , 0 , NULL, NULL, "Default architecture to choose, when there's a choice." },
{ "expr-prefix" , OptionValue::eTypeFileSpec , false, 0 , NULL, NULL, "Path to a file containing expressions to be prepended to all expressions." },
{ "prefer-dynamic-value" , OptionValue::eTypeEnum , false, eNoDynamicValues , NULL, g_dynamic_value_types, "Should printed values be shown as their dynamic value." },
{ "prefer-dynamic-value" , OptionValue::eTypeEnum , false, eDynamicDontRunTarget , NULL, g_dynamic_value_types, "Should printed values be shown as their dynamic value." },
{ "enable-synthetic-value" , OptionValue::eTypeBoolean , false, true , NULL, NULL, "Should synthetic values be used by default whenever available." },
{ "skip-prologue" , OptionValue::eTypeBoolean , false, true , NULL, NULL, "Skip function prologues when setting breakpoints by name." },
{ "source-map" , OptionValue::eTypePathMap , false, 0 , NULL, NULL, "Source path remappings used to track the change of location between a source file when built, and "

View File

@@ -1193,6 +1193,13 @@ def visit(prefix, dir, names):
suite.addTests(unittest2.defaultTestLoader.loadTestsFromName(base))
def disabledynamics():
ci = lldb.DBG.GetCommandInterpreter()
res = lldb.SBCommandReturnObject()
ci.HandleCommand("setting set target.prefer-dynamic-value no-dynamic-values", res, False)
if not res.Succeeded():
raise Exception('disabling dynamic type support failed')
def lldbLoggings():
"""Check and do lldb loggings if necessary."""
@@ -1382,6 +1389,9 @@ lldb.runHooks = runHooks
# Turn on lldb loggings if necessary.
lldbLoggings()
# Disable default dynamic types for testing purposes
disabledynamics()
# Install the control-c handler.
unittest2.signals.installHandler()