History log of /external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a8b56238ce138e70433a0ce0b4218c9257beae38 19-Jun-2013 Greg Clayton <gclayton@apple.com> Added the ability to get a list of types from a SBModule or SBCompileUnit. Sebastien Metrot wanted this, and sent a hollowed out patch. I filled in the blanks and did the low level implementation. The new functions are:

//------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// module.
///
/// @param[in] type_mask
/// A bitfield that consists of one or more bits logically OR'ed
/// together from the lldb::TypeClass enumeration. This allows
/// you to request only structure types, or only class, struct
/// and union types. Passing in lldb::eTypeClassAny will return
/// all types found in the debug information for this module.
///
/// @return
/// A list of types in this module that match \a type_mask
//------------------------------------------------------------------
lldb::SBTypeList
SBModule::GetTypes (uint32_t type_mask)


//------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// compile unit.
///
/// @param[in] type_mask
/// A bitfield that consists of one or more bits logically OR'ed
/// together from the lldb::TypeClass enumeration. This allows
/// you to request only structure types, or only class, struct
/// and union types. Passing in lldb::eTypeClassAny will return
/// all types found in the debug information for this compile
/// unit.
///
/// @return
/// A list of types in this compile unit that match \a type_mask
//------------------------------------------------------------------
lldb::SBTypeList
SBCompileUnit::GetTypes (uint32_t type_mask = lldb::eTypeClassAny);

This lets you request types by filling out a mask that contains one or more bits from the lldb::TypeClass enumerations, so you can only get the types you really want.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
732579b63a2624512812c8e33cc110a1437e49b6 07-Feb-2013 Greg Clayton <gclayton@apple.com> Be ready for fully qualified hash names in the __apples_types tables.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
36da2aa6dc5ad9994b638ed09eb81c44cc05540b 25-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
e0028b827759c5ad2cbc45947371c362193a63bc 19-Jan-2012 Sean Callanan <scallanan@apple.com> Fixed a problem where maintaining the ObjCInterfaceMap
for each ObjCInterfaceDecl was imposing performance
penalties for Objective-C apps. Instead, we now use
the normal function query mechanisms, which use the
relevant accelerator tables.

This fix also includes some modifications to the
SymbolFile which allow us to find Objective-C methods
and report their Clang Decls correctly.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
cc63936a21c8cf41e6fffe88daec21c1412cab69 18-Jan-2012 Greg Clayton <gclayton@apple.com> Fixed an issue where we might not find the one true ObjC definition. Now we do things
much smarter by extracting search results more efficiently and by properly obeying the
must_be_implementation bool in the SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE()
function.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
3d7b6fb01a1c514192b47e9e93d4336996664947 13-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10688864>

Fixed the new __apple_types to be able to accept a DW_TAG_structure_type
forward declaration and then find a DW_TAG_class_type definition, or vice
versa.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
c80dca73893e5b24f4d16c092da75532715b405e 06-Jan-2012 Greg Clayton <gclayton@apple.com> We finalized on the new .apple_types accelerator table format where we don't
emit fully qualified names, so now we make sure the DW_TAG values match and
still lookup using the basename.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
cc152b20d7b07aa4c229977b7b0d8d94cbda2ff5 06-Jan-2012 Johnny Chen <johnny.chen@apple.com> http://llvm.org/bugs/show_bug.cgi?id=11715
comma at end of enumerator list


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
e10ddb09b5a8614b035b2f54f99daf0337597208 29-Dec-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10568905>

Fixed an issue where our new accelerator tables could cause a crash
when we got a full 32 bit hash match, yet a C string mismatch.

We had a member variable in DWARFMappedHash::Prologue named
"min_hash_data_byte_size" the would compute the byte size of HashData
so we could skip hash data efficiently. It started out with a byte size
value of 4. When we read the table in from disk, we would clear the
atom array and read it from disk, and the byte size would still be set
to 4. We would then, as we read each atom from disk, increment this count.
So the byte size of the HashData was off, which means when we get a lookup
whose 32 bit hash does matches, but the C string does NOT match (which is
very very rare), then we try and skip the data for that hash and we would
add an incorrect offset and get off in our parsing of the hash data and
cause this crash.

To fix this I added a few safeguards:
1 - I now correctly clear the hash data size when we reset the atom array using the new DWARFMappedHash::Prologue::ClearAtoms() function.
2 - I now correctly always let the AppendAtom() calculate the byte size of the hash (before we were doing things manually some times, which was correct, but not good)
3 - I also track if the size of each HashData is a fixed byte size or not, and "do the right thing" when we need to skip the data.
4 - If we do get off in the weeds, then I make sure to return an error and stop any further parsing from happening.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
74b25a069f8932c2369b244965b5b28f41ba3519 17-Dec-2011 Greg Clayton <gclayton@apple.com> Modified LLDB to be able to handle our updated __apple_types accelerator tables
which have the dwarf DIE tag (DW_TAG_XXX enum) and TypeFlags for each type.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
b5c023af6df0f4f9eddd14284ca986f578c6bee2 09-Dec-2011 Greg Clayton <gclayton@apple.com> Tested a theory on the where when we lookup things in the accelerator tables
that if we prefer the current compile unit, followed by any compile units that
already had their DIEs parsed, followed by the rest of the matches, that we
might save some memory. This turned out not to help much. The code is commented
out, but I want to check it in so I don't lose the code in case it could help
later.

Added the ability to efficiently find the objective C class implementation
when using the new .apple_types acclerator tables with the type flags. If the
type flags are not available, we default back to what we were doing before.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
37bb8ddd443da172f42bb8657f15ec856a525c84 08-Dec-2011 Greg Clayton <gclayton@apple.com> Added a new class called lldb_private::SymbolFileType which is designed to
take a SymbolFile reference and a lldb::user_id_t and be used in objects
which represent things in debug symbols that have types where we don't need
to know the true type yet, such as in lldb_private::Variable objects. This
allows us to defer resolving the type until something is used. More specifically
this allows us to get 1000 local variables from the current function, and if
the user types "frame variable argc", we end up _only_ resolving the type for
"argc" and not for the 999 other local variables. We can expand the use of this
as needed in the future.

Modified the DWARFMappedHash class to be able to read the HashData that has
more than just the DIE offset. It currently will read the atoms in the header
definition and read the data correctly. Currently only the DIE offset and
type flags are supported. This is needed for adding type flags to the
.apple_types hash accelerator tables.

Fixed a assertion crash that would happen if we have a variable that had a
DW_AT_const_value instead of a location where "location.LocationContains_DW_OP_addr()"
would end up asserting when it tried to parse the variable location as a
DWARF opcode list.

Decreased the amount of memory that LLDB would use when evaluating an expression
by 3x - 4x for clang. There was a place in the namespace lookup code that was
parsing all namespaces with a certain name in a DWARF file instead of stopping
when it found the first match. This was causing all of the compile units with
a matching namespace to get parsed into memory and causing unnecessary memory
bloat.

Improved "Target::EvaluateExpression(...)" to not try and find a variable
when the expression contains characters that would certainly cause an expression
to need to be evaluated by the debugger.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
f09a857961404d937463e9419dc3a8d019cae5f6 31-Oct-2011 Daniel Dunbar <daniel@zuster.org> warnings: Fix several uses of trailing comma on enumeration extensions.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
bbe39167c881ac025cdc4f383ee8895cfd5b1148 21-Oct-2011 Greg Clayton <gclayton@apple.com> Fixed some issues where we might not have one of the new apple accelerator
tables (like the .apple_namespaces) and it would cause us to index DWARF that
didn't need to be indexed.

Updated the MappedHash.h (generic Apple accelerator table) and the DWARF
specific one (HashedNameToDIE.h) to be up to date with the latest and
greatest hash table format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
8b7b2276132c7353cabd22000287b42badc26613 08-Oct-2011 Jim Ingham <jingham@apple.com> Move the responsibility for translating the various eFunctionNameType lookups to the
SymbolFIle (it was done mostly in the BreakpointResolverName resolver before.) Then
tailor our searches to the way the indexed maps are laid out. This removes a bunch
of test case failures using indexed dSYM's.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
00db215522a0cf31082d26d7ab30d2aa30965acf 05-Oct-2011 Greg Clayton <gclayton@apple.com> Enable all the new accelerator tables if they are present and don't manually
index the DWARF. Also fixed an issue with memory accelerator tables with a
size of 1 where we would loop infinitely.

Added support for parsing the new .apple_namespaces section which gives us a
memory hash table for looking up namespaces.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
60a5424fee1b98ea62e159491d380bf7f34bae44 29-Sep-2011 Greg Clayton <gclayton@apple.com> Found a great optimization after speaking with Sean Callanan which cleans
up the implementation details of the on disk hash, these changed implement
the changes in the on disk table format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
f6e3de2d877dc94120c72624a79e488c9bea5c35 28-Sep-2011 Greg Clayton <gclayton@apple.com> Convert over to the latest and greatest on disc accelerator
hash tables. Renamed the DWARF sections to ".apple_names" and
".apple_types" until we get more buy in from other vendors.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
d74270e83908066c946d150faec9516349e1118b 02-Sep-2011 Greg Clayton <gclayton@apple.com> Added alpha .debug_names and .debug_types support in the DWARF parser.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
4ec7b85a4445f779915c79e91085cbaf1b776a87 02-Sep-2011 Greg Clayton <gclayton@apple.com> Added files I forget to checkin with my last checkin.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h