Fixed a bug where deleting a regex summary would not immediately reflect in the variables display

The "systemwide summaries" feature has been removed and replaced with a more general and
powerful mechanism.
Categories:
 - summaries can now be grouped into buckets, called "categories" (it is expected that categories
   correspond to libraries and/or runtime environments)
 - to add a summary to a category, you can use the -w option to type summary add and give
   a category name (e.g. type summary add -f "foo" foo_t -w foo_category)
 - categories are by default disabled, which means LLDB will not look into them for summaries,
   to enable a category use "type category enable". once a category is enabled, LLDB will
   look into that category for summaries. the rules are quite trivial: every enabled category
   is searched for an exact match. if an exact match is nowhere to be found, any match is
   searched for in every enabled category (whether it involves cascading, going to base classes,
   ...). categories are searched into the order in which they were enabled (the most recently
   enabled category first, then the second most and so on..)
 - by default, most commands that deal with summaries, use a category named "default" if no
   explicit -w parameter is given (the observable behavior of LLDB should not change when
   categories are not explicitly used)
 - the systemwide summaries are now part of a "system" category

llvm-svn: 135463
This commit is contained in:
Enrico Granata
2011-07-19 02:34:21 +00:00
parent 8608e6e913
commit 1490c6fd8f
19 changed files with 1462 additions and 467 deletions

View File

@@ -202,22 +202,21 @@ ValueObject::UpdateFormatsIfNeeded()
ClearCustomSummaryFormat();
m_summary_str.clear();
}
if (m_last_format_mgr_revision != Debugger::ValueFormats::GetCurrentRevision())
if (m_last_format_mgr_revision != Debugger::Formatting::ValueFormats::GetCurrentRevision())
{
if (m_last_summary_format.get())
m_last_summary_format.reset((StringSummaryFormat*)NULL);
if (m_last_value_format.get())
m_last_value_format.reset((ValueFormat*)NULL);
Debugger::ValueFormats::Get(*this, m_last_value_format);
Debugger::Formatting::ValueFormats::Get(*this, m_last_value_format);
// to find a summary we look for a direct summary, then if there is none
// we look for a regex summary. if there is none we look for a system
// summary (direct), and if also that fails, we look for a system
// regex summary
if (!Debugger::SummaryFormats::Get(*this, m_last_summary_format))
if (!Debugger::RegexSummaryFormats::Get(*this, m_last_summary_format))
if (!Debugger::SystemSummaryFormats::Get(*this, m_last_summary_format))
Debugger::SystemRegexSummaryFormats::Get(*this, m_last_summary_format);
m_last_format_mgr_revision = Debugger::ValueFormats::GetCurrentRevision();
Debugger::Formatting::GetSummaryFormat(*this, m_last_summary_format);
m_last_format_mgr_revision = Debugger::Formatting::ValueFormats::GetCurrentRevision();
ClearUserVisibleData();
}