History log of /external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e5dadc19db7e2f2e5ed5edf34dc920446266fd00 25-Jul-2013 Greg Clayton <gclayton@apple.com> Add explicit braces to quiet the "avoid dangling else" warning from clang.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
6b80ad96e1960e9c5a4c6c5cab09cc7591d4c3f9 25-Jul-2013 Ashok Thirumurthi <ashok.thirumurthi@intel.com> Fixes LLDB address ranges with gcc 4.8
- Modifies the DWARF parser for DWARF 4 specification of hi_pc as an offset-from-low-pc.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
1e46e1a0d88b2a8a132550d346b23ed93f03165a 15-Jul-2013 Greg Clayton <gclayton@apple.com> Fix issues with GCC debugging. GCC emits DWARF in unique ways that LLDB wasn't handling. This fix will fix cases where classes are forward declared using DW_TAG_structure_type and then actually defined using DW_TAG_class_type. LLDB, when it finds a forward declaration, would try and find and parse the complete type. It does this by:

1 - looking up the type basename in the type index
2 - iterate through all matches and look for decl contexts (namespace/class hierarchy) that match

The issue was the decl context matching wasn't watching for DW_TAG_class_type/DW_TAG_structure_type mismatches, and it wasn't also getting the name for DIE's that didn't have a DW_AT_name, but did have a DW_AT_specification that had a name.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
3f8c60656ba14750deff97961eb032f20a7c408a 03-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13561911>

Modify LLDB to handle DW_FORM_ref_addr attributes for DWARF3 and DWARF4.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
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/DWARFDebugInfoEntry.cpp
6f3a711edcfaeca1efbb998cdea5d0a0782ddfa3 08-Dec-2012 Greg Clayton <gclayton@apple.com> Make sure to check for DW_AT_linkage_name to get the mangled name in the DWARF along with the older DW_AT_MIPS_linkage_name attribute.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
5f35a4be95aed0e5b2cb36f7d785bcbfc67284ae 29-Nov-2012 Daniel Malea <daniel.malea@intel.com> Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
6f01c93497df194b6f2194630a81e87d806ce0e0 12-Oct-2012 Jim Ingham <jingham@apple.com> Bunch of cleanups for warnings found by the llvm static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
03f6d64223d2ffb2e250f6bd1928acc3e70a0667 27-Sep-2012 Greg Clayton <gclayton@apple.com> Ashok Thirumurthi patch to enable the latest and greatest DWARF forms from the DWARF 4 specification.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
cbacba1f223ee4819a4b99924dd994c7e52fdf04 13-Jul-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11740973>

Fixed issues that could happen when the UUID doesn't change in a binary and old stale debug info could end up being used.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
cbff0fb344c17ef0699c1375f6ddeb5bcd1bdbe2 24-Apr-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11291668>

Fixed an issue that would happen when using debug map with DWARF in the .o files where we wouldn't ever track down the actual definition for a type when things were in namespaces. We now serialize the decl context information into an intermediate format which allows us to track down the correct definition for a type regardless of which DWARF symbol file it comes from. We do this by creating a "DWARFDeclContext" object that contains the DW_TAG + name for each item in a decl context which we can then use to veto potential accelerator table matches. For example, the accelerator tables store the basename of the type, so if you have "std::vector<int>", we would end up with an accelerator table entry for the type that contained "vector<int>", which we would then search for using a DWARFDeclContext object that contained:

[0] DW_TAG_class_type "vector<int>"
[1] DW_TAG_namespace "std"

This is currently used to track down forward declarations for things like "class a::b::Foo;".


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
b88575efac471db9156c731c3e28ad7e6d14b5ef 02-Feb-2012 Greg Clayton <gclayton@apple.com> Fixed an issue where we might accept the wrong type when completing
a type when we have a forward declaration. We always have found a
type by basename, but now we also compare the decl context of the
die we are trying to complete with the matches we find from the accelerator
tables to ensure we get the right one.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
df6dc88322f103b263092d752db4490e628a1cbd 05-Jan-2012 Greg Clayton <gclayton@apple.com> Added code in the Host layer that can report system log messages
so that we don't have "fprintf (stderr, ...)" calls sprinkled everywhere.
Changed all needed locations over to using this.

For non-darwin, we log to stderr only. On darwin, we log to stderr _and_
to ASL (Apple System Log facility). This will allow GUI apps to have a place
for these error and warning messages to go, and also allows the command line
apps to log directly to the terminal.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
2f28ece553d2ef0d7b3e8d1419020591ec3818f9 04-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10507811>

Be better at detecting when DWARF changes and handle this more
gracefully than asserting and exiting.

Also fixed up a bunch of system calls that weren't properly checking
for EINTR.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
59857327d22aa88e30349d14535cdf515166529e 29-Dec-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10551280>

Fixed a crasher that can occur when parsing invalid DWARF.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
75d8c2591f6c56a09338bf4967a41510165a907e 28-Nov-2011 Greg Clayton <gclayton@apple.com> CommandObjectProcess was recently changed to automatically use the platform
to launch a process for debugging. Since this isn't supported on all platforms,
we need to do what we used to do if this isn't supported. I added:

bool
Platform::CanDebugProcess ();

This will get checked before trying to launch a process for debugging and then
fall back to launching the process through the current host debugger. This
should solve the issue for linux and keep the platform code clean.

Centralized logging code for logging errors, warnings and logs when reporting
things for modules or symbol files. Both lldb_private::Module and
lldb_private::SymbolFile now have the following member functions:

void
LogMessage (Log *log, const char *format, ...);

void
ReportWarning (const char *format, ...);

void
ReportError (const char *format, ...);

These will all output the module name and object (if any) such as:

"error: lldb.so ...."
"warning: my_archive.a(foo.o) ...."

This will keep the output consistent and stop a lot of logging calls from
having to try and output all of the information that uniquely identifies
a module or symbol file. Many places in the code were grabbing the path to the
object file manually and if the module represented a .o file in an archive, we
would see log messages like:

error: foo.a - some error happened



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
c5b3f5025871a8f359c08f242894af00178d08dd 22-Nov-2011 Greg Clayton <gclayton@apple.com> Shrink-to-fit our std::vector<DWARFDebugInfoEntry> collections and save 20%
to 30% of memory. The size doubling was killing us and we ended up with up to
just under 50% of empty capacity. Cleaning this up saves us a ton of memory.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
489575c164b3b3cfed2f80af6cc58848ad17ab5a 19-Nov-2011 Greg Clayton <gclayton@apple.com> Further performance improvements in the DWARF parser:
1 - the DIE collections no longer have the NULL tags which saves up to 25%
of the memory on typical C++ code
2 - faster parsing by not having to run the SetDIERelations() function anymore
it is done when parsing the DWARF very efficiently.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
0963fdd2478c6404d11b96e7d5ae1f2de8b3bb1f 18-Nov-2011 Greg Clayton <gclayton@apple.com> Looking at our memory usage with Instruments when debugging a large application
we say that the vectors of DWARFDebugInfoEntry objects were the highest on the
the list.

With these changes we cut our memory usage by 40%!!! I did this by reducing
the size of the DWARFDebugInfoEntry from a previous:

uint32_t offset
uint32_t parent_idx
uint32_t sibling_idx
Abbrev * abbrev_ptr

which was 20 bytes, but rounded up to 24 bytes due to alignment. Now we have:

uint32_t offset
uint32_t parent_idx
uint32_t sibling_idx
uint32_t abbr_idx:15, // 32767 possible abbreviation codes
has_children:1, // 0 = no children, 1 = has children
tag:16; // DW_TAG_XXX value

This gets us down to 16 bytes per DIE. I tested some VERY large DWARF files
(900MB) and found there were only ~700 unique abbreviations, so 32767 should
be enough for any sane compiler. If it isn't there are built in assertions
that will fire off and tell us.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
6364304894596829a96c8cd3b07b4ea5e00029da 14-Oct-2011 Greg Clayton <gclayton@apple.com> Make sure we create only unique one namespace per AST when parsing the DWARF.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
bc36a861b8e0b2f2dde34f27c9fa9629a357d598 08-Oct-2011 Greg Clayton <gclayton@apple.com> Added more functionality to Range template classes in RangeMap.h and converted remaining DWARF areas that were using ranges over to this class. Also converted lldb_private::Block to use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
7e5fa7fc1f8efd24c078e063b2c4b5e13ba5be20 20-Sep-2011 Jason Molenda <jmolenda@apple.com> Update declarations for all functions/methods that accept printf-style
stdarg formats to use __attribute__ format so the compiler can flag
incorrect uses. Fix all incorrect uses. Most of these are innocuous,
a few were resulting in crashes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
144188bc458a35997d2f2e52206ab69747439073 13-Sep-2011 Greg Clayton <gclayton@apple.com> Huge memory and performance improvements in the DWARF parser.

Address ranges are now split up into two different tables:
- one in DWARFDebugInfo that is compile unit specific
- one in each DWARFCompileUnit that has exact function DIE offsets

This helps keep the size of the aranges down since the main table will get
uniqued and sorted and have consecutive ranges merged. We then only parse the
compile unit one on demand once we have determined that a compile unit contains
the address in question. We also now use the .debug_aranges section if there
is one instead of always indexing the DWARF manually.

NameToDIE now uses a UniqueCStringMap<dw_offset> map instead of a std::map.
std::map is very bulky as each node has 3 pointers and the key and value types.
This gets our NameToDIE entry down to 12 bytes each instead of 48 which saves
us a lot of memory when we have very large DWARF.

DWARFDebugAranges now has a smaller footprint for each range it contains to
save on memory.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
169c5fbc8cac8a0bd724bd18fd9d816ca3d6486a 27-Aug-2011 Jim Ingham <jingham@apple.com> Fix a bunch of places where we were passing Stream *'s but were
never checking them for NULL. Pass a reference instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
545489247a7b520dd603c9e5b0f0ef05a77ba9e3 26-Aug-2011 Jim Ingham <jingham@apple.com> Move DIE location reporting into the DWARFDebugInfo class, use it from there in SymbolFileDWARF::ParseType (and eventually in other interesting places as well.)

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
c5dca6c656ffc94d2f958c56d7bc9076eac90783 12-Aug-2011 Greg Clayton <gclayton@apple.com> Fixed some issues with parsing C++ methods where our detection
was failing if the DWARF was laid out in a certain way. The way
we detect C++ classes is now more robust so that a class method
can be defined outside of the class and refer to a definition inside
the class with a DW_AT_specification or DW_AT_abstract_origin attribute.

Fixed a case in Thread.cpp where we were looking up info in the frame
when we didn't need to. This was from some changes to support external
editors. Now the info is only looked up if needed.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
7bb069b2216523f21fb6a3ce867f2f7278b1b07b 10-Feb-2011 Greg Clayton <gclayton@apple.com> Modified version of a patch from Warren Paul that takes care of issues with
indirect forms, deals with empty DW_AT_comp_dir attributes, and fixups for
handling other signed integer types.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
5d187e5495ee17f6763337a6ae28c2a7b07e4945 08-Jan-2011 Greg Clayton <gclayton@apple.com> Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.

Thanks Bruce!



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
e5748d889fb7fb97b3ff07444894d7714776b609 10-Nov-2010 Greg Clayton <gclayton@apple.com> Did a lot of code cleanup.

Fixed the DWARF plug-in such that when it gets all attributes for a DIE, that
it omits the DW_AT_sibling and DW_AT_declaration when getting attributes
from a DW_AT_abstract_origin or DW_AT_specification DIE.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
f3d0b0c8081691128626eb496fdfcbf8ae54c1de 27-Oct-2010 Greg Clayton <gclayton@apple.com> Updated the lldb_private::Flags class to have better method names and made
all of the calls inlined in the header file for better performance.

Fixed the summary for C string types (array of chars (with any combo if
modifiers), and pointers to chars) work in all cases.

Fixed an issue where a forward declaration to a clang type could cause itself
to resolve itself more than once if, during the resolving of the type itself
it caused something to try and resolve itself again. We now remove the clang
type from the forward declaration map in the DWARF parser when we start to
resolve it and avoid this additional call. This should stop any duplicate
members from appearing and throwing all the alignment of structs, unions and
classes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
4c273fd84b6233fba1f2ce9d34affa5c349d0911 16-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Unbreak build, you can't take a pointer from a "register" variable. Most compilers ignore this keyword anyways.

Also remove a typedef that typedefs nothing.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
5fcff9ac1a713d5e814b4a05edef7544be470ad0 15-Sep-2010 Greg Clayton <gclayton@apple.com> 15-20% speed improvement when parsing DWARF. I used instruments to
find the hotspots in our code when indexing the DWARF. A combination of
using SmallVector to avoid collection allocations, using fixed form
sizes when possible, and optimizing the hot loops contributed to the
speedup.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
178710cd4307f3d44dc76ebd70fc7daf7ebe17c5 14-Sep-2010 Greg Clayton <gclayton@apple.com> Looking at some of the test suite failures in DWARF in .o files with the
debug map showed that the location lists in the .o files needed some
refactoring in order to work. The case that was failing was where a function
that was in the "__TEXT.__textcoal_nt" in the .o file, and in the
"__TEXT.__text" section in the main executable. This made symbol lookup fail
due to the way we were finding a real address in the debug map which was
by finding the section that the function was in in the .o file and trying to
find this in the main executable. Now the section list supports finding a
linked address in a section or any child sections. After fixing this, we ran
into issue that were due to DWARF and how it represents locations lists.
DWARF makes a list of address ranges and expressions that go along with those
address ranges. The location addresses are expressed in terms of a compile
unit address + offset. This works fine as long as nothing moves around. When
stuff moves around and offsets change between the remapped compile unit base
address and the new function address, then we can run into trouble. To deal
with this, we now store supply a location list slide amount to any location
list expressions that will allow us to make the location list addresses into
zero based offsets from the object that owns the location list (always a
function in our case).

With these fixes we can now re-link random address ranges inside the debugger
for use with our DWARF + debug map, incremental linking, and more.

Another issue that arose when doing the DWARF in the .o files was that GCC
4.2 emits a ".debug_aranges" that only mentions functions that are externally
visible. This makes .debug_aranges useless to us and we now generate a real
address range lookup table in the DWARF parser at the same time as we index
the name tables (that are needed because .debug_pubnames is just as useless).
llvm-gcc doesn't generate a .debug_aranges section, though this could be
fixed, we aren't going to rely upon it.

Renamed a bunch of "UINT_MAX" to "UINT32_MAX".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
24943d2ee8bfaa7cf5893e4709143924157a5c1e 08-Jun-2010 Chris Lattner <sabre@nondot.org> Initial checkin of lldb code from internal Apple repo.


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