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/Core/ValueObject.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/Core/ValueObject.cpp')
-rw-r--r-- | lldb/source/Core/ValueObject.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index fe27d712842..6d157be9775 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -2687,7 +2687,8 @@ ValueObject::DumpValueObject bool use_synth, bool scope_already_checked, bool flat_output, - uint32_t omit_summary_depth + uint32_t omit_summary_depth, + bool ignore_cap ) { if (valobj) @@ -2864,7 +2865,8 @@ ValueObject::DumpValueObject ValueObjectSP synth_vobj = valobj->GetSyntheticValue(use_synth ? lldb::eUseSyntheticFilter : lldb::eNoSyntheticFilter); - const uint32_t num_children = synth_vobj->GetNumChildren(); + uint32_t num_children = synth_vobj->GetNumChildren(); + bool print_dotdotdot = false; if (num_children) { if (flat_output) @@ -2878,6 +2880,14 @@ ValueObject::DumpValueObject s.PutCString(is_ref ? ": {\n" : " {\n"); s.IndentMore(); } + + uint32_t max_num_children = valobj->GetUpdatePoint().GetTargetSP()->GetMaximumNumberOfChildrenToDisplay(); + + if (num_children > max_num_children && !ignore_cap) + { + num_children = max_num_children; + print_dotdotdot = true; + } for (uint32_t idx=0; idx<num_children; ++idx) { @@ -2897,12 +2907,15 @@ ValueObject::DumpValueObject use_synth, true, flat_output, - omit_summary_depth > 1 ? omit_summary_depth - 1 : 0); + omit_summary_depth > 1 ? omit_summary_depth - 1 : 0, + ignore_cap); } } if (!flat_output) { + if (print_dotdotdot) + s.Indent("...\n"); s.IndentLess(); s.Indent("}\n"); } |