diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-08-19 21:13:46 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-08-19 21:13:46 +0000 |
commit | d64d0bc0ea6864eb209b55d5a5faae988dea296b (patch) | |
tree | 906d55427f70479caaac7c76bcafc0cfef24c410 /lldb/source/Core/FormatClasses.cpp | |
parent | 4ad83e69a01ab401267d46f933e7fc33e9fcccea (diff) | |
download | bcm5719-llvm-d64d0bc0ea6864eb209b55d5a5faae988dea296b.tar.gz bcm5719-llvm-d64d0bc0ea6864eb209b55d5a5faae988dea296b.zip |
- Now using ${var} as the summary for an aggregate type will produce "name-of-type @ object-location" instead of giving an error
e.g. you may get "foo_class @ 0x123456" when typing "type summary add -f ${var} foo_class"
- Added a new special formatting token %T for summaries. This shows the type of the object.
Using it, the new "type @ location" summary could be manually generated by writing ${var%T} @ ${var%L}
- Bits and pieces required to support "frame variable array[n-m]"
The feature is not enabled yet because some additional design and support code is required, but the basics
are getting there
- Fixed a potential issue where a ValueObjectSyntheticFilter was not holding on to its SyntheticChildrenSP
Because of the way VOSF are being built now, this has never been an actual issue, but it is still sensible for
a VOSF to hold on to the SyntheticChildrenSP as well as to its FrontEnd
llvm-svn: 138080
Diffstat (limited to 'lldb/source/Core/FormatClasses.cpp')
-rw-r--r-- | lldb/source/Core/FormatClasses.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lldb/source/Core/FormatClasses.cpp b/lldb/source/Core/FormatClasses.cpp index 9a7b32cd63f..ff469862584 100644 --- a/lldb/source/Core/FormatClasses.cpp +++ b/lldb/source/Core/FormatClasses.cpp @@ -181,6 +181,31 @@ SyntheticFilter::GetDescription() return sstr.GetString(); } +std::string +SyntheticArrayView::GetDescription() +{ + StreamString sstr; + sstr.Printf("%s%s%s {\n", + m_cascades ? "" : " (not cascading)", + m_skip_pointers ? " (skip pointers)" : "", + m_skip_references ? " (skip references)" : ""); + SyntheticArrayRange* ptr = &m_head; + while (ptr && ptr != m_tail) + { + if (ptr->GetLow() == ptr->GetHigh()) + sstr.Printf(" [%d]\n", + ptr->GetLow()); + else + sstr.Printf(" [%d-%d]\n", + ptr->GetLow(), + ptr->GetHigh()); + ptr = ptr->GetNext(); + } + + sstr.Printf("}"); + return sstr.GetString(); +} + SyntheticScriptProvider::FrontEnd::FrontEnd(std::string pclass, lldb::ValueObjectSP be) : SyntheticChildrenFrontEnd(be), |