[Lldb-commits] [lldb] r225486 - Dynamic values have been around (and stable and reliable) for long enough that we can turn them on by default

Enrico Granata egranata at apple.com
Thu Jan 8 16:47:24 PST 2015


Author: enrico
Date: Thu Jan  8 18:47:24 2015
New Revision: 225486

URL: http://llvm.org/viewvc/llvm-project?rev=225486&view=rev
Log:
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


Modified:
    lldb/trunk/source/Target/Target.cpp
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=225486&r1=225485&r2=225486&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Thu Jan  8 18:47:24 2015
@@ -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 "

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=225486&r1=225485&r2=225486&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Thu Jan  8 18:47:24 2015
@@ -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()
 





More information about the lldb-commits mailing list