From 30f287fde5b1e4d871726dccd0aad5913917f4f0 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Sat, 28 Dec 2013 08:44:02 +0000 Subject: 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 , upon fetching the value for an object of your type, LLDB will display it as-if it was of enumeration type 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 --- lldb/source/DataFormatters/FormatManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/DataFormatters/FormatManager.cpp') 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); -- cgit v1.2.3