diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-08-12 02:00:06 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-08-12 02:00:06 +0000 |
commit | 22c55d180ddc9772ee03d5034677d27a2735c92e (patch) | |
tree | ca48d4214abacb43fba0202dbfb673cf04d99f92 /lldb/source/Target/Target.cpp | |
parent | e45db981e45f21ef6ec4101d12e626aa627b4374 (diff) | |
download | bcm5719-llvm-22c55d180ddc9772ee03d5034677d27a2735c92e.tar.gz bcm5719-llvm-22c55d180ddc9772ee03d5034677d27a2735c92e.zip |
*Some more optimizations in usage of ConstString
*New setting target.max-children-count gives an upper-bound to the number of child objects that will be displayed at each depth-level
This might be a breaking change in some scenarios. To override the new limit you can use the --show-all-children (-A) option
to frame variable or increase the limit in your lldbinit file
*Command "type synthetic" has been split in two:
- "type synthetic" now only handles Python synthetic children providers
- the new command "type filter" handles filters
Because filters and synthetic providers are both ways to replace the children of a ValueObject, only one can be effective at any given time.
llvm-svn: 137416
Diffstat (limited to 'lldb/source/Target/Target.cpp')
-rw-r--r-- | lldb/source/Target/Target.cpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 600a06bc137..25d37435ff6 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -1578,6 +1578,7 @@ Target::SettingsController::CreateInstanceSettings (const char *instance_name) #define TSC_PREFER_DYNAMIC "prefer-dynamic-value" #define TSC_SKIP_PROLOGUE "skip-prologue" #define TSC_SOURCE_MAP "source-map" +#define TSC_MAX_CHILDREN "max-children-count" static const ConstString & @@ -1615,6 +1616,12 @@ GetSettingNameForSkipPrologue () return g_const_string; } +static const ConstString & +GetSettingNameForMaxChildren () +{ + static ConstString g_const_string (TSC_MAX_CHILDREN); + return g_const_string; +} bool @@ -1668,7 +1675,8 @@ TargetInstanceSettings::TargetInstanceSettings m_expr_prefix_contents_sp (), m_prefer_dynamic_value (2), m_skip_prologue (true, true), - m_source_map (NULL, NULL) + m_source_map (NULL, NULL), + m_max_children_display(256) { // CopyInstanceSettings is a pure virtual function in InstanceSettings; it therefore cannot be called // until the vtables for TargetInstanceSettings are properly set up, i.e. AFTER all the initializers. @@ -1694,7 +1702,8 @@ TargetInstanceSettings::TargetInstanceSettings (const TargetInstanceSettings &rh m_expr_prefix_contents_sp (rhs.m_expr_prefix_contents_sp), m_prefer_dynamic_value (rhs.m_prefer_dynamic_value), m_skip_prologue (rhs.m_skip_prologue), - m_source_map (rhs.m_source_map) + m_source_map (rhs.m_source_map), + m_max_children_display(rhs.m_max_children_display) { if (m_instance_name != InstanceSettings::GetDefaultName()) { @@ -1771,6 +1780,13 @@ TargetInstanceSettings::UpdateInstanceSettingsVariable (const ConstString &var_n { err = UserSettingsController::UpdateBooleanOptionValue (value, op, m_skip_prologue); } + else if (var_name == GetSettingNameForMaxChildren()) + { + bool ok; + uint32_t new_value = Args::StringToUInt32(value, 0, 10, &ok); + if (ok) + m_max_children_display = new_value; + } else if (var_name == GetSettingNameForSourcePathMap ()) { switch (op) @@ -1841,6 +1857,7 @@ TargetInstanceSettings::CopyInstanceSettings (const lldb::InstanceSettingsSP &ne m_expr_prefix_contents_sp = new_settings_ptr->m_expr_prefix_contents_sp; m_prefer_dynamic_value = new_settings_ptr->m_prefer_dynamic_value; m_skip_prologue = new_settings_ptr->m_skip_prologue; + m_max_children_display = new_settings_ptr->m_max_children_display; } bool @@ -1870,6 +1887,12 @@ TargetInstanceSettings::GetInstanceSettingsValue (const SettingEntry &entry, else if (var_name == GetSettingNameForSourcePathMap ()) { } + else if (var_name == GetSettingNameForMaxChildren()) + { + StreamString count_str; + count_str.Printf ("%d", m_max_children_display); + value.AppendString (count_str.GetData()); + } else { if (err) @@ -1923,5 +1946,6 @@ Target::SettingsController::instance_settings_table[] = { TSC_PREFER_DYNAMIC, eSetVarTypeEnum , NULL , g_dynamic_value_types, false, false, "Should printed values be shown as their dynamic value." }, { TSC_SKIP_PROLOGUE , eSetVarTypeBoolean, "true" , NULL, false, false, "Skip function prologues when setting breakpoints by name." }, { TSC_SOURCE_MAP , eSetVarTypeArray , NULL , NULL, false, false, "Source path remappings to use when locating source files from debug information." }, + { TSC_MAX_CHILDREN , eSetVarTypeInt , "256" , NULL, true, false, "Maximum number of children to expand in any level of depth." }, { NULL , eSetVarTypeNone , NULL , NULL, false, false, NULL } }; |