diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-07-22 00:16:08 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-07-22 00:16:08 +0000 |
commit | d55546b27a90ecc088316a706446c2a293ad94b0 (patch) | |
tree | ecf0e9d8c2f243dae418cc779c708a62958b56b3 /lldb/source/Core/Debugger.cpp | |
parent | 1872173841e85dd061b99b85ad2f1fb24cb23609 (diff) | |
download | bcm5719-llvm-d55546b27a90ecc088316a706446c2a293ad94b0.tar.gz bcm5719-llvm-d55546b27a90ecc088316a706446c2a293ad94b0.zip |
when typing a summary string you can use the %S symbol to explicitly indicate that you want the summary to be used to print the target object
(e.g. ${var%S}). this might already be the default if your variable is of an aggregate type
new feature: synthetic filters. you can restrict the number of children for your variables to only a meaningful subset
- the restricted list of children obeys the typical rules (e.g. summaries prevail over children)
- one-line summaries show only the filtered (synthetic) children, if you type an expanded summary string, or you use Python scripts, all the real children are accessible
- to provide a synthetic children list use the "type synth add" command, as in:
type synth add foo_type --child varA --child varB[0] --child varC->packet->flags[1-4]
(you can use ., ->, single-item array operator [N] and bitfield operator [N-M]; array slice access is not supported, giving simplified names to expression paths is not supported)
- a new -S option to frame variable and target variable lets you override synthetic children and instead show real ones
llvm-svn: 135731
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index cce768f8684..219fbfa8985 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -733,8 +733,12 @@ ScanFormatDescriptor(const char* var_name_begin, // if this is a V, print the value using the default format if (*format_name == 'V') *val_obj_display = ValueObject::eDisplayValue; + // if this is an L, print the location of the value if (*format_name == 'L') *val_obj_display = ValueObject::eDisplayLocation; + // if this is an S, print the summary after all + if (*format_name == 'S') + *val_obj_display = ValueObject::eDisplaySummary; } // a good custom format tells us to print the value using it else @@ -1761,6 +1765,12 @@ Debugger::Formatting::GetSummaryFormat(ValueObject& vobj, { return GetFormatManager().Get(vobj, entry); } +bool +Debugger::Formatting::GetSyntheticFilter(ValueObject& vobj, + lldb::SyntheticFilterSP& entry) +{ + return GetFormatManager().Get(vobj, entry); +} bool Debugger::Formatting::Categories::Get(const ConstString &category, lldb::FormatCategorySP &entry) @@ -1791,7 +1801,7 @@ Debugger::Formatting::Categories::Clear() void Debugger::Formatting::Categories::Clear(ConstString &category) { - GetFormatManager().Category(category.GetCString())->Clear(); + GetFormatManager().Category(category.GetCString())->ClearSummaries(); } void |