diff options
| author | Greg Clayton <gclayton@apple.com> | 2013-03-05 23:54:39 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2013-03-05 23:54:39 +0000 |
| commit | 3e067534088a1671619f1d6c701ce92e217be96c (patch) | |
| tree | 7e24be9202b2f4d4cc60da451665f28d8b81bc2b /lldb/source/Plugins/SymbolFile | |
| parent | 30820f068594bdd2ff5bf5aa10ca0944b80709c2 (diff) | |
| download | bcm5719-llvm-3e067534088a1671619f1d6c701ce92e217be96c.tar.gz bcm5719-llvm-3e067534088a1671619f1d6c701ce92e217be96c.zip | |
<rdar://problem/13341472>
LLDB wasn't printing the names for negative enums. Fixed the signed extraction of enumerators and how they were registered with clang's type system.
llvm-svn: 176533
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 16 | ||||
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h | 1 |
2 files changed, 13 insertions, 4 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 603d824f315..bb10ed7a309 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -2385,7 +2385,9 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type if (die->HasChildren()) { SymbolContext sc(GetCompUnitForDWARFCompUnit(dwarf_cu)); - ParseChildEnumerators(sc, clang_type, type->GetByteSize(), dwarf_cu, die); + bool is_signed = false; + ast.IsIntegerType(clang_type, is_signed); + ParseChildEnumerators(sc, clang_type, is_signed, type->GetByteSize(), dwarf_cu, die); } ast.CompleteTagDeclarationDefinition (clang_type); return clang_type; @@ -4051,7 +4053,8 @@ size_t SymbolFileDWARF::ParseChildEnumerators ( const SymbolContext& sc, - clang_type_t enumerator_clang_type, + clang_type_t enumerator_clang_type, + bool is_signed, uint32_t enumerator_byte_size, DWARFCompileUnit* dwarf_cu, const DWARFDebugInfoEntry *parent_die @@ -4089,7 +4092,10 @@ SymbolFileDWARF::ParseChildEnumerators { case DW_AT_const_value: got_value = true; - enum_value = form_value.Unsigned(); + if (is_signed) + enum_value = form_value.Signed(); + else + enum_value = form_value.Unsigned(); break; case DW_AT_name: @@ -6074,7 +6080,9 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, if (die->HasChildren()) { SymbolContext cu_sc(GetCompUnitForDWARFCompUnit(dwarf_cu)); - ParseChildEnumerators(cu_sc, clang_type, type_sp->GetByteSize(), dwarf_cu, die); + bool is_signed = false; + ast.IsIntegerType(clang_type, is_signed); + ParseChildEnumerators(cu_sc, clang_type, is_signed, type_sp->GetByteSize(), dwarf_cu, die); } ast.CompleteTagDeclarationDefinition (clang_type); } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h index 31fb4cc3b3f..f4703e8e147 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h @@ -368,6 +368,7 @@ protected: size_t ParseChildEnumerators( const lldb_private::SymbolContext& sc, lldb::clang_type_t enumerator_qual_type, + bool is_signed, uint32_t enumerator_byte_size, DWARFCompileUnit* dwarf_cu, const DWARFDebugInfoEntry *enum_die); |

