Commit Graph

10 Commits

Author SHA1 Message Date
Frederic Riss
469f438d4d [dsymutil] Add an way to iterate over a DebugMapObject symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232305 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-15 02:02:53 +00:00
Frederic Riss
e7a356409d [dsymutil] Add function size to the debug map.
The debug map embedded by ld64 in binaries conatins function sizes.
These sizes are less precise than the ones given by the debug information
(byte granularity vs linker atom granularity), but they might cover code
that is referenced in the line table but not in the DIE tree (that might
very well be a compiler bug that I need to investigate later).
Anyway, extracting that information is necessary to be able to mimic
dsymutil's behavior exactly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232300 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-15 01:29:30 +00:00
Frederic Riss
a646d2705f [dsymutil] Make trivial accessor const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230819 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 00:28:56 +00:00
Frederic Riss
e9483b84f0 [dsymutil] Add DebugMapObject::lookupObjectAddress()
It turns out the debug map will be interogated both by name and
by object file address. Add the latter capability.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229177 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 23:18:16 +00:00
Frederic Riss
8732027cd8 [dsymutil] Add the detected target triple to the debug map.
It will be needed to instantiate the Target object that we will
use to create all the MC objects for the dwarf emission.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226525 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-19 23:33:14 +00:00
Chandler Carruth
1b279144ec [cleanup] Re-sort all the #include lines in LLVM using
utils/sort_includes.py.

I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225974 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14 11:23:27 +00:00
Benjamin Kramer
71bb7d0925 Fix Doxygen command misspellings.
Found by -Wdocumentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224197 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-13 19:19:07 +00:00
Frederic Riss
31e081ed96 Initial dsymutil tool commit.
The goal of this tool is to replicate Darwin's dsymutil functionality
based on LLVM. dsymutil is a DWARF linker. Darwin's linker (ld64) does
not link the debug information, it leaves it in the object files in
relocatable form, but embbeds a `debug map` into the executable that
describes where to find the debug information and how to relocate it.
When releasing/archiving a binary, dsymutil is called to link all the DWARF
information into a `dsym bundle` that can distributed/stored along with
the binary.

With this commit, the LLVM based dsymutil is just able to parse the STABS
debug maps embedded by ld64 in linked binaries (and not all of them, for
example archives aren't supported yet).

Note that the tool directory is called dsymutil, but the executable is
currently called llvm-dsymutil. This discrepancy will disappear once the
tool will be feature complete. At this point the executable will be renamed
to dsymutil, but until then you do not want it to override the system one.

    Differential Revision: http://reviews.llvm.org/D6242

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224134 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-12 17:31:24 +00:00
Frederic Riss
574ca2ad28 Revert "Initial dsymutil tool commit."
This reverts commit r223793. The review thread wasn't concluded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223794 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-09 17:21:50 +00:00
Frederic Riss
08550bc751 Initial dsymutil tool commit.
The goal of this tool is to replicate Darwin's dsymutil functionality
based on LLVM. dsymutil is a DWARF linker. Darwin's linker (ld64) does
not link the debug information, it leaves it in the object files in
relocatable form, but embbeds a `debug map` into the executable that
describes where to find the debug information and how to relocate it.
When releasing/archiving a binary, dsymutil is called to link all the DWARF
information into a `dsym bundle` that can distributed/stored along with
the binary.

With this commit, the LLVM based dsymutil is just able to parse the STABS
debug maps embedded by ld64 in linked binaries (and not all of them, for
example archives aren't supported yet).

Note that the tool directory is called dsymutil, but the executable is
currently called llvm-dsymutil. This discrepancy will disappear once the
tool will be feature complete. At this point the executable will be renamed
to dsymutil, but until then you do not want it to override the system one.

    Differential Revision: http://reviews.llvm.org/D6242

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223793 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-09 17:03:30 +00:00