summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/dsymutil/debug-map-parsing.test
Commit message (Collapse)AuthorAgeFilesLines
* [dsymutil] Make the CachedBinaryHolder the defaultJonas Devlieghere2018-06-291-6/+6
| | | | | | | | Replaces all uses of the old binary holder with its cached variant. Differential revision: https://reviews.llvm.org/D48770 llvm-svn: 335991
* [dsymutil] Upstream emitting of papertrail warnings.Jonas Devlieghere2018-04-021-1/+1
| | | | | | | | | | When running dsymutil as part of your build system, it can be desirable for warnings to be part of the end product, rather than just being emitted to the output stream. This patch upstreams that functionality. Differential revision: https://reviews.llvm.org/D44639 llvm-svn: 328965
* [dsymutil] Rename llvm-dsymutil -> dsymutilJonas Devlieghere2018-03-181-5/+5
| | | | | | | | | | | Now that almost all functionality of Apple's dsymutil has been upstreamed, the open source variant can be used as a drop in replacement. Hence we feel it's no longer necessary to have the llvm prefix. Differential revision: https://reviews.llvm.org/D44527 llvm-svn: 327790
* [dsymutil] Print architecture in warningJonas Devlieghere2018-03-141-3/+4
| | | | | | | Make the architecture part of the warning in the DebugMapParser. This makes things consistent with the Apple's internal version of dsymutil. llvm-svn: 327485
* [dsymutil] Unify error handling outside DwarfLinker.Jonas Devlieghere2018-03-131-4/+4
| | | | | | | | This is a follow-up to r327137 where we unified error handling for the DwarfLinker. This replaces calls to errs() and outs() with the appropriate ostream wrapper everywhere in dsymutil. llvm-svn: 327411
* [dsymutil] Fix handling of common symbols.Frederic Riss2016-01-311-2/+2
| | | | | | | | | | | | | | | | | llvm-dsymutil was misinterpreting the value of common symbols as their address when it actually contains their size. This didn't impact llvm-dsymutil's ability to link the debug information for common symbols because these are always found by name and not by address. Things could however go wrong when the size of a common object matched the object file address of another symbol. Depending on the link order of the symbols the common object might incorrectly evict this other object from the address to symbol mapping, and then link the evicted symbol with a wrong binary address. Use the new ability to have symbols without an object file address to fix this. llvm-svn: 259318
* [dsymutil] Store an optional BinaryPath in the debug map.Frederic Riss2015-08-261-0/+4
| | | | | | | | | 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] Rename -v option to -verboseFrederic Riss2015-07-291-5/+5
| | | | | | | | | | | | The dsymutil-classic -v option dumps the tool version rather than putting it in verbose mode. Rename -v to -verbose and update the tests that use it (in the process removing it from a few tests that didn't require it anymore since the -dump-debug-map option was introduced). A followup commit will reintroduce the -v option that dumps the version. llvm-svn: 243582
* [dsymutil] Make the triple detection more strict.Frederic Riss2015-07-241-4/+4
| | | | | | | | MachOObjectFile offers a method for detecting the correct triple, use it instead of the previous approximation. This doesn't matter right now, but it will become important for mach-o universal (fat) binaries. llvm-svn: 243095
* [dsymutil] Replace -parse-only option with -dump-debug-mapFrederic Riss2015-06-031-5/+5
| | | | | | | | | | As the serialized debug map is becoming a first class citizen, a way to cleanly dump it is required. We used -parse-only combined with -v for that purpose before, but it dumps a lot of unrelated debug stuff. Dumping the debug map was the only use of the -parse-only flag anyway, so replace it with a more useful option. llvm-svn: 238940
* [dsymutil] Use YAMLIO to dump debug map.Frederic Riss2015-06-011-40/+42
| | | | | | | | | | | 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 function size to the debug map.Frederic Riss2015-03-151-22/+22
| | | | | | | | | | | | 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] Add the detected target triple to the debug map.Frederic Riss2015-01-191-3/+5
| | | | | | | 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
* [dsymutil] Implement the BinaryHolder object and gain archive support.Frederic Riss2015-01-051-0/+29
| | | | | | | | | | | | | | | | | | | This object is meant to own the ObjectFiles and their underlying MemoryBuffer. It is basically the equivalent of an OwningBinary except that it efficiently handles Archives. It is optimized for efficiently providing mappings of members of the same archive when they are opened successively (which is standard in Darwin debug maps, objects from the same archive will be contiguous). Of course, the BinaryHolder will also be used by the DWARF linker once it is commited, but for now only the debug map parser uses it. With this change, you can run llvm-dsymutil on your Darwin debug build of clang and get a complete debug map for it. Differential Revision: http://reviews.llvm.org/D6690 llvm-svn: 225207
* Relax debug-map-parsing.test error message check for WindowsReid Kleckner2014-12-121-4/+4
| | | | | | On Windows we get the string "no such file or directory". llvm-svn: 224141
* Initial dsymutil tool commit.Frederic Riss2014-12-121-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | 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-48/+0
| | | | | | This reverts commit r223793. The review thread wasn't concluded. llvm-svn: 223794
* Initial dsymutil tool commit.Frederic Riss2014-12-091-0/+48
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