diff options
author | Enrico Granata <egranata@apple.com> | 2013-12-28 08:44:02 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2013-12-28 08:44:02 +0000 |
commit | 30f287fde5b1e4d871726dccd0aad5913917f4f0 (patch) | |
tree | e5897c00d57db3da41508fff19955a4cf2dab98e /lldb/source/DataFormatters/FormatManager.cpp | |
parent | ffd810525de92bed4d8d197fd3f73fc1897ea0c6 (diff) | |
download | bcm5719-llvm-30f287fde5b1e4d871726dccd0aad5913917f4f0.tar.gz bcm5719-llvm-30f287fde5b1e4d871726dccd0aad5913917f4f0.zip |
Add a new way to bind a format to a type: by enum type
The "type format add" command gets a new flag --type (-t). If you pass -t <sometype>, upon fetching the value for an object of your type,
LLDB will display it as-if it was of enumeration type <sometype>
This is useful in cases of non-contiguous enums where there are empty gaps of unspecified values, and as such one cannot type their variables as the enum type,
but users would still like to see them as-if they were of the enum type (e.g. DWARF field types with their user-reserved ranges)
The SB API has also been improved to handle both types of formats, and a test case is added
llvm-svn: 198105
Diffstat (limited to 'lldb/source/DataFormatters/FormatManager.cpp')
-rw-r--r-- | lldb/source/DataFormatters/FormatManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp index ca4603c94bb..41e2acb1c99 100644 --- a/lldb/source/DataFormatters/FormatManager.cpp +++ b/lldb/source/DataFormatters/FormatManager.cpp @@ -741,7 +741,7 @@ AddFormat (TypeCategoryImpl::SharedPointer category_sp, TypeFormatImpl::Flags flags, bool regex = false) { - lldb::TypeFormatImplSP format_sp(new TypeFormatImpl(format, flags)); + lldb::TypeFormatImplSP format_sp(new TypeFormatImpl_Format(format, flags)); if (regex) category_sp->GetRegexTypeFormatsContainer()->Add(RegularExpressionSP(new RegularExpression(type_name.AsCString())),format_sp); |