forked from OSchip/llvm-project
Prevent vain lldb::user_id_t 0xffffffff lookups
I have found LLDB commonly looks up lldb::user_id_t 0xffffffff failing to find its DIE. One would rather expect LLDB_INVALID_UID == 0xffffffffffffffff in such case. DWARFASTParserClang.cpp:495 492 type_sp.reset( 493 new Type(die.GetID(), dwarf, type_name_const_str, byte_size, NULL, 494 DIERef(encoding_uid).GetUID(dwarf), encoding_data_type, 495 &decl, clang_type, resolve_state)); encoding_uid = (DWARFFormValue) {m_cu = 0x0, m_form = 0, m_value = {value = {uval = 0, sval = 0, cstr = 0x0}, data = 0x0}} -> DIERef::DIERef(const DWARFFormValue &form_value = {m_cu = 0x0, m_form = 0, m_value = {value = {uval = 0, sval = 0, cstr = 0x0}, data = 0x0}}) -> (DIERef) {cu_offset = 0xffffffff, die_offset = 0xffffffff} -> lldb::user_id_t DIERef::GetUID(SymbolFileDWARF *dwarf = 0x61d00000b480) const -> Type::Type(lldb::user_id_t encoding_uid = 0xffffffff) But 0xffffffff != #define LLDB_INVALID_UID UINT64_MAX Differential revision: https://reviews.llvm.org/D37492 llvm-svn: 319580
This commit is contained in:
parent
8fed634e21
commit
4f39b294aa
|
@ -65,7 +65,7 @@ lldb::user_id_t DIERef::GetUID(SymbolFileDWARF *dwarf) const {
|
|||
//
|
||||
// SymbolFileDWARFDwo sets the ID to the compile unit offset.
|
||||
//----------------------------------------------------------------------
|
||||
if (dwarf)
|
||||
if (dwarf && die_offset != DW_INVALID_OFFSET)
|
||||
return dwarf->GetID() | die_offset;
|
||||
else
|
||||
return LLDB_INVALID_UID;
|
||||
|
|
Loading…
Reference in New Issue