summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/DebugMap.h
Commit message (Collapse)AuthorAgeFilesLines
* [dsymutil] Replace TimeValue with TimePointPavel Labath2016-11-091-6/+10
| | | | | | | | | | | | | | Summary: All changes are pretty straight-forward. I chose to use TimePoints with second precision, as that is all that seems to be required here. Reviewers: friss, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25908 llvm-svn: 286358
* Remove duplicated default move ctors/move assign. No functional change.Benjamin Kramer2016-10-271-13/+2
| | | | llvm-svn: 285302
* Resubmit "Make YAML support SmallVector"Zachary Turner2016-08-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | This resubmits a3770391c5fb64108d565e12f61dd77ce71b5b4f, which was reverted due to breakages on non-Windows machines. Due to differences in template instantiation rules on Microsoft and non-Microsoft platforms, a member access restriction was triggering on non-Microsoft compilers. Previously, a friend declaration for std::vector<> had been introduced into the DebugMap class to make the member access restriction pass, but the introduction of support for SmallVector<> meant that an additional friend declaration would need to be added. This didn't really make a lot of sense since the user of the macro is probably only using one type (SmallVector<>, vector<>, etc) and we could in theory add support for even more types to this macro in the future (e.g. std::deque), so rather than add another friend declaration, I just made the type being referenced a public nested typedef instead of a private nested typedef. llvm-svn: 277888
* [dsymutil] Allow debug map mappings with no object file address. NFCFrederic Riss2016-01-311-5/+8
| | | | | | | | | | | This change just changes the data structure that ties symbol names, object file address and linked binary addresses to accept mappings with no object file address. Such symbol mappings are not fed into the debug map yet, so this patch is NFC. A subsequent patch will make use of this functionality for common symbols. llvm-svn: 259317
* dsymutil: Provide better warnings when clang modules cannot be found.Adrian Prantl2016-01-141-1/+1
| | | | | | rdar://problem/22823264 llvm-svn: 257784
* [dsymutil] Store an optional BinaryPath in the debug map.Frederic Riss2015-08-261-1/+5
| | | | | | | | | llvm-dsymutil needs to emit dSYM companion bundles. These are binary files that replicate some of the orignal binary file properties (sections and symbols). To get acces to these properties, pass the binary path in the debug map. llvm-svn: 246011
* [dsymutil] Implement support for handling mach-o universal binaries as main ↵Frederic Riss2015-08-051-1/+1
| | | | | | | | | | | | | | | | | input/output. The DWARF linker isn't touched by this, the implementation links individual files and merges them together into a fat binary by calling out to the 'lipo' utility. The main change is that the MachODebugMapParser can now return multiple debug maps for a single binary. The test just verifies that lipo would be invoked correctly, but doesn't actually generate a binary. This mimics the way clang tests its external iplatform tools integration. llvm-svn: 244087
* [dsymutil] Check archive members timestamps.Frederic Riss2015-07-221-2/+9
| | | | | | | | | The debug map contains the timestamp of the object files in references. We do not check these in the general case, but it's really useful if you have archives where different versions of an object file have been appended. This allows llvm-dsymutil to find the right one. llvm-svn: 242965
* [dsymutil] Apply clang-format. NFCFrederic Riss2015-06-051-1/+2
| | | | llvm-svn: 239186
* [dsymutil] Out-line the YAML serialization code. NFCFrederic Riss2015-06-051-76/+15
| | | | | | | | | | | It will get a bit bigger in an upcoming commit. No need to have all of that in the header. Also move parseYAMLDebugMap() to the same place as the serialization code. This way it will be able to share a private Context object with it. llvm-svn: 239185
* [dsymutil] Handle the -oso-prepend-path option when the input is a YAML ↵Frederic Riss2015-06-051-2/+7
| | | | | | | | debug map All the tests using a YAML debug map will need this. llvm-svn: 239163
* Reapply r238941 - [dsymutil] Accept a YAML debug map as input instead of a ↵Frederic Riss2015-06-031-19/+43
| | | | | | | | | | | | | | | | | | | | | binary. With a couple more constructors that GCC thinks are necessary. Original commit message: [dsymutil] Accept a YAML debug map as input instead of a binary. To do this, the user needs to pass the new -y flag. As it wasn't tested before, the debug map YAML deserialization was completely buggy (mainly because the DebugMapObject has a dual mapping that allows to search by name and by address, but only the StringMap got populated). It's fixed and tested in this commit by augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil reads the debug map and pipes it in a second instance that does the actual link without touching the initial binary. llvm-svn: 238959
* Revert "[dsymutil] Accept a YAML debug map as input instead of a binary."Frederic Riss2015-06-031-31/+19
| | | | | | This reverts commit r238941 while I figure out the bot issues. llvm-svn: 238943
* [dsymutil] Accept a YAML debug map as input instead of a binary.Frederic Riss2015-06-031-19/+31
| | | | | | | | | | | | | To do this, the user needs to pass the new -y flag. As it wasn't tested before, the debug map YAML deserialization was completely buggy (mainly because the DebugMapObject has a dual mapping that allows to search by name and by address, but only the StringMap got populated). It's fixed and tested in this commit by augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil reads the debug map and pipes it in a second instance that does the actual link without touching the initial binary. llvm-svn: 238941
* [dsymutil] Remove extraneous std::move of local in return statement.Frederic Riss2015-06-011-1/+1
| | | | llvm-svn: 238790
* [dsymutil] Remove unnecessary ';'Frederic Riss2015-06-011-1/+1
| | | | llvm-svn: 238783
* [dsymutil] Use YAMLIO to dump debug map.Frederic Riss2015-06-011-3/+114
| | | | | | | | | | | Doing so will allow us to also accept a YAML debug map in input as using YAMLIO gives us the parsing for free. Being able to have textual debug maps will in turn allow much more control over the tests, because 1/ no need to check-in a binary containing the debug map and 2/ it will allow to use the same objects/IR files with made-up debug-maps to test different scenari. llvm-svn: 238781
* [dsymutil] Add an way to iterate over a DebugMapObject symbols.Frederic Riss2015-03-151-0/+4
| | | | llvm-svn: 232305
* [dsymutil] Add function size to the debug map.Frederic Riss2015-03-151-3/+5
| | | | | | | | | | | | 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. llvm-svn: 232300
* [dsymutil] Make trivial accessor const.Frederic Riss2015-02-281-1/+1
| | | | llvm-svn: 230819
* [dsymutil] Add DebugMapObject::lookupObjectAddress()Frederic Riss2015-02-131-1/+9
| | | | | | | It turns out the debug map will be interogated both by name and by object file address. Add the latter capability. llvm-svn: 229177
* [dsymutil] Add the detected target triple to the debug map.Frederic Riss2015-01-191-0/+6
| | | | | | | It will be needed to instantiate the Target object that we will use to create all the MC objects for the dwarf emission. llvm-svn: 226525
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-1/+1
| | | | | | | | | | | 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. llvm-svn: 225974
* Fix Doxygen command misspellings.Benjamin Kramer2014-12-131-1/+1
| | | | | | Found by -Wdocumentation. llvm-svn: 224197
* Initial dsymutil tool commit.Frederic Riss2014-12-121-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 224134
* Revert "Initial dsymutil tool commit."Frederic Riss2014-12-091-131/+0
| | | | | | This reverts commit r223793. The review thread wasn't concluded. llvm-svn: 223794
* Initial dsymutil tool commit.Frederic Riss2014-12-091-0/+131
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 llvm-svn: 223793
OpenPOWER on IntegriCloud