diff options
| author | Greg Clayton <gclayton@apple.com> | 2011-10-19 18:09:39 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2011-10-19 18:09:39 +0000 |
| commit | 81c22f6104a391f4b3c9f072cf8cfd47b746367d (patch) | |
| tree | 24933ab12c153c7af3b0604f4cfd54a457aa4c7f /lldb/source/Symbol | |
| parent | c620f554b9c465a9b1db8cd832bf2ce3e11447bf (diff) | |
| download | bcm5719-llvm-81c22f6104a391f4b3c9f072cf8cfd47b746367d.tar.gz bcm5719-llvm-81c22f6104a391f4b3c9f072cf8cfd47b746367d.zip | |
Moved lldb::user_id_t values to be 64 bit. This was going to be needed for
process IDs, and thread IDs, but was mainly needed for for the UserID's for
Types so that DWARF with debug map can work flawlessly. With DWARF in .o files
the type ID was the DIE offset in the DWARF for the .o file which is not
unique across all .o files, so now the SymbolFileDWARFDebugMap class will
make the .o file index part (the high 32 bits) of the unique type identifier
so it can uniquely identify the types.
llvm-svn: 142534
Diffstat (limited to 'lldb/source/Symbol')
| -rw-r--r-- | lldb/source/Symbol/Block.cpp | 8 | ||||
| -rw-r--r-- | lldb/source/Symbol/CompileUnit.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Symbol/Function.cpp | 4 | ||||
| -rw-r--r-- | lldb/source/Symbol/Symbol.cpp | 32 | ||||
| -rw-r--r-- | lldb/source/Symbol/SymbolContext.cpp | 6 | ||||
| -rw-r--r-- | lldb/source/Symbol/Type.cpp | 2 |
6 files changed, 36 insertions, 18 deletions
diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp index a65eb78f47d..886144d36d1 100644 --- a/lldb/source/Symbol/Block.cpp +++ b/lldb/source/Symbol/Block.cpp @@ -89,7 +89,7 @@ Block::Dump(Stream *s, addr_t base_addr, int32_t depth, bool show_context) const const Block* parent_block = GetParent(); if (parent_block) { - s->Printf(", parent = {0x%8.8x}", parent_block->GetID()); + s->Printf(", parent = {0x%8.8llx}", parent_block->GetID()); } if (m_inlineInfoSP.get() != NULL) { @@ -194,7 +194,7 @@ Block::DumpSymbolContext(Stream *s) Function *function = CalculateSymbolContextFunction(); if (function) function->DumpSymbolContext(s); - s->Printf(", Block{0x%8.8x}", GetID()); + s->Printf(", Block{0x%8.8llx}", GetID()); } void @@ -398,7 +398,7 @@ Block::AddRange (const Range& range) const Declaration &func_decl = func_type->GetDeclaration(); if (func_decl.GetLine()) { - log->Printf ("warning: %s/%s:%u block {0x%8.8x} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8x} in function {0x%8.8x} from %s/%s", + log->Printf ("warning: %s/%s:%u block {0x%8.8llx} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8llx} in function {0x%8.8llx} from %s/%s", func_decl.GetFile().GetDirectory().GetCString(), func_decl.GetFile().GetFilename().GetCString(), func_decl.GetLine(), @@ -413,7 +413,7 @@ Block::AddRange (const Range& range) } else { - log->Printf ("warning: block {0x%8.8x} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8x} in function {0x%8.8x} from %s/%s", + log->Printf ("warning: block {0x%8.8llx} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8llx} in function {0x%8.8llx} from %s/%s", GetID(), (uint32_t)m_ranges.GetSize(), block_start_addr, diff --git a/lldb/source/Symbol/CompileUnit.cpp b/lldb/source/Symbol/CompileUnit.cpp index ec383eb5951..3380603e1dd 100644 --- a/lldb/source/Symbol/CompileUnit.cpp +++ b/lldb/source/Symbol/CompileUnit.cpp @@ -73,7 +73,7 @@ void CompileUnit::DumpSymbolContext(Stream *s) { GetModule()->DumpSymbolContext(s); - s->Printf(", CompileUnit{0x%8.8x}", GetID()); + s->Printf(", CompileUnit{0x%8.8llx}", GetID()); } diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp index 11480f7c086..1f643d42c0d 100644 --- a/lldb/source/Symbol/Function.cpp +++ b/lldb/source/Symbol/Function.cpp @@ -367,7 +367,7 @@ Function::Dump(Stream *s, bool show_context) const } else if (m_type_uid != LLDB_INVALID_UID) { - s->Printf(", type_uid = 0x%8.8x", m_type_uid); + s->Printf(", type_uid = 0x%8.8llx", m_type_uid); } s->EOL(); @@ -423,7 +423,7 @@ void Function::DumpSymbolContext(Stream *s) { m_comp_unit->DumpSymbolContext(s); - s->Printf(", Function{0x%8.8x}", GetID()); + s->Printf(", Function{0x%8.8llx}", GetID()); } size_t diff --git a/lldb/source/Symbol/Symbol.cpp b/lldb/source/Symbol/Symbol.cpp index b764bada554..8ff972c2577 100644 --- a/lldb/source/Symbol/Symbol.cpp +++ b/lldb/source/Symbol/Symbol.cpp @@ -20,8 +20,8 @@ using namespace lldb_private; Symbol::Symbol() : - UserID (), SymbolContextScope (), + m_uid (UINT32_MAX), m_mangled (), m_type (eSymbolTypeInvalid), m_type_data (0), @@ -39,7 +39,7 @@ Symbol::Symbol() : Symbol::Symbol ( - user_id_t symID, + uint32_t symID, const char *name, bool name_is_mangled, SymbolType type, @@ -52,8 +52,8 @@ Symbol::Symbol uint32_t size, uint32_t flags ) : - UserID (symID), SymbolContextScope (), + m_uid (symID), m_mangled (name, name_is_mangled), m_type (type), m_type_data (0), @@ -71,7 +71,7 @@ Symbol::Symbol Symbol::Symbol ( - user_id_t symID, + uint32_t symID, const char *name, bool name_is_mangled, SymbolType type, @@ -82,8 +82,8 @@ Symbol::Symbol const AddressRange &range, uint32_t flags ) : - UserID (symID), SymbolContextScope (), + m_uid (symID), m_mangled (name, name_is_mangled), m_type (type), m_type_data (0), @@ -100,8 +100,8 @@ Symbol::Symbol } Symbol::Symbol(const Symbol& rhs): - UserID (rhs), SymbolContextScope (rhs), + m_uid (rhs.m_uid), m_mangled (rhs.m_mangled), m_type (rhs.m_type), m_type_data (rhs.m_type_data), @@ -123,7 +123,7 @@ Symbol::operator= (const Symbol& rhs) if (this != &rhs) { SymbolContextScope::operator= (rhs); - UserID::operator= (rhs); + m_uid = rhs.m_uid; m_mangled = rhs.m_mangled; m_type = rhs.m_type; m_type_data = rhs.m_type_data; @@ -140,6 +140,24 @@ Symbol::operator= (const Symbol& rhs) return *this; } +void +Symbol::Clear() +{ + m_uid = UINT32_MAX; + m_mangled.Clear(); + m_type = eSymbolTypeInvalid; + m_type_data = 0; + m_type_data_resolved = false; + m_is_synthetic = false; + m_is_debug = false; + m_is_external = false; + m_size_is_sibling = false; + m_size_is_synthesized = false; + m_searched_for_function = false; + m_addr_range.Clear(); + m_flags = 0; +} + AddressRange * Symbol::GetAddressRangePtr() { diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp index 673dc3cb545..43ac5fc6e5f 100644 --- a/lldb/source/Symbol/SymbolContext.cpp +++ b/lldb/source/Symbol/SymbolContext.cpp @@ -500,7 +500,7 @@ SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc, if (log) { - log->Printf ("warning: inlined block 0x%8.8x doesn't have a range that contains file address 0x%llx", + log->Printf ("warning: inlined block 0x%8.8llx doesn't have a range that contains file address 0x%llx", curr_inlined_block->GetID(), curr_frame_pc.GetFileAddress()); } #ifdef LLDB_CONFIGURATION_DEBUG @@ -519,7 +519,7 @@ SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc, } if (objfile) { - fprintf (stderr, "warning: inlined block 0x%8.8x doesn't have a range that contains file address 0x%llx in %s/%s\n", + fprintf (stderr, "warning: inlined block 0x%8.8llx doesn't have a range that contains file address 0x%llx in %s/%s\n", curr_inlined_block->GetID(), curr_frame_pc.GetFileAddress(), objfile->GetFileSpec().GetDirectory().GetCString(), @@ -527,7 +527,7 @@ SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc, } else { - fprintf (stderr, "warning: inlined block 0x%8.8x doesn't have a range that contains file address 0x%llx\n", + fprintf (stderr, "warning: inlined block 0x%8.8llx doesn't have a range that contains file address 0x%llx\n", curr_inlined_block->GetID(), curr_frame_pc.GetFileAddress()); } } diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp index 0d4c3d3c234..d54d4c30559 100644 --- a/lldb/source/Symbol/Type.cpp +++ b/lldb/source/Symbol/Type.cpp @@ -228,7 +228,7 @@ Type::DumpValue { s->PutChar('('); if (verbose) - s->Printf("Type{0x%8.8x} ", GetID()); + s->Printf("Type{0x%8.8llx} ", GetID()); DumpTypeName (s); s->PutCString(") "); } |

