summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/dsymutil
Commit message (Collapse)AuthorAgeFilesLines
...
* Attempt to fix papertrail-warnings.test on Windows bots.Nico Weber2018-04-021-2/+2
| | | | llvm-svn: 328971
* [dsymutil] Upstream emitting of papertrail warnings.Jonas Devlieghere2018-04-023-1/+32
| | | | | | | | | | 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-1858-110/+110
| | | | | | | | | | | 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-132-5/+5
| | | | | | | | 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] Perform analyzeContextInfo and CloneDIEs in parallelJonas Devlieghere2018-03-131-19/+24
| | | | | | | | | | | | | | | | | | This patch makes dsymutil perform analyzeContextInfo and CloneDIEs in parallel. For the same object file, there is a dependency between the two. However, we can do analyzeContextInfo for the next object file while cloning DIEs for the current. This is exactly the approach taken in this patch. For WebCore, this leads to a performance improvement of 29% and for clang we see similar results with at 32% improvement. A big thanks to Pete Cooper who came up with the original idea and the PoC. Differential revision: https://reviews.llvm.org/D43945 llvm-svn: 327399
* [dsymutil] Unify error handling and add colorJonas Devlieghere2018-03-092-2/+2
| | | | | | | | | We improved the handling of errors and warnings in dwarfdump's verifier in rL314498. This patch does the same thing for dsymutil. Differential revision: https://reviews.llvm.org/D44052 llvm-svn: 327137
* [dsymutil] Embed toolchain in dSYM bundleJonas Devlieghere2018-03-082-1/+7
| | | | | | | | | Allow us to embed the (Xcode) toolchain in the dSYM bundle's property list. Differential revision: https://reviews.llvm.org/D44151 llvm-svn: 326994
* [dwarfdump] Only print CU relative offset in verbose modeJonas Devlieghere2018-03-073-32/+32
| | | | | | | | | | | | Instead of only printing the CU-relative offset in non-verbose mode, it makes more sense to only printed the resolved address. In verbose mode we still print both. Differential revision: https://reviews.llvm.org/D44148 rdar://33525475 llvm-svn: 326903
* [dsymutil] Skip DW_AT_sibling attributes.Jonas Devlieghere2018-02-272-6/+19
| | | | | | | | | | Following DW_AT_sibling attributes completely defeats the pruning pass. Although clang doesn't generate the DW_AT_sibling attribute we should still handle it correctly. Differential revision: https://reviews.llvm.org/D43439 llvm-svn: 326231
* [dsymutil][test] Add PowerPC testJonas Devlieghere2018-02-273-0/+24
| | | | | | | | | | Add test that verifies that we don't follow DWARF values with a reference form class, such as DW_AT_sibling. Since clang doesn't generate the latter attribute, we added a PowerPC test generated on an old PowerBook G4. (Thanks Adrian!) llvm-svn: 326183
* [DebugInfo] Support DWARF v5 source code embedding extensionScott Linder2018-02-233-27/+27
| | | | | | | | | | | | | | | | | | | In DWARF v5 the Line Number Program Header is extensible, allowing values with new content types. In this extension a content type is added, DW_LNCT_LLVM_source, which contains the embedded source code of the file. Add new optional attribute for !DIFile IR metadata called source which contains source text. Use this to output the source to the DWARF line table of code objects. Analogously extend METADATA_FILE in Bitcode and .file directive in ASM to support optional source. Teach llvm-dwarfdump and llvm-objdump about the new values. Update the output format of llvm-dwarfdump to make room for the new attribute on file_names entries, and support embedded sources for the -source option in llvm-objdump. Differential Revision: https://reviews.llvm.org/D42765 llvm-svn: 325970
* [dsymutil] Correctly handle DW_TAG_labelJonas Devlieghere2018-02-202-0/+16
| | | | | | | | | This patch contains logic for handling DW_TAG_label that's present in darwin's dsymutil implementation, but not yet upstream. Differential revision: https://reviews.llvm.org/D43438 llvm-svn: 325600
* [dwarfdump] Fix spurious verification errors for DW_AT_location attributesJonas Devlieghere2018-02-173-8/+285
| | | | | | | | | | | Verifying any DWARF file that is optimized and contains at least one tag with a DW_AT_location with a location list offset as a DW_AT_form_dataXXX results in dwarfdump spuriously claiming that the location list is invalid. Differential revision: https://reviews.llvm.org/D40199 llvm-svn: 325430
* Change "UNSUPPORTED: windows" to be "UNSUPPORTED: system-windows" so that ↵Douglas Yung2018-02-082-2/+2
| | | | | | | | test is actually skipped on Windows. Reviewed by Paul Robinson llvm-svn: 324632
* [test][dsymutil] Fix tests for Windows bots.Jonas Devlieghere2018-02-083-17/+2
| | | | | | | | | | The UNSUPPORTED directive was not honored by the bot, presumably because of the FIXME above it. This moves the comment down and removes the remaining update check from basic-linking-x86.test. This should un-break: llvm-clang-x86_64-expensive-checks-win/builds/7798/ llvm-svn: 324598
* Re-land [dsymutil] Upstream update featureJonas Devlieghere2018-02-084-0/+72
| | | | | | | | | | This commit attempts to re-land the r324480 which was reverted in r324493 because it broke the Windows bots. For now I disabled the two update tests on Windows until I'm able to debug this. Differential revision: https://reviews.llvm.org/D42880 llvm-svn: 324592
* Revert dsymutil -update commitsJonas Devlieghere2018-02-073-51/+0
| | | | | | | Revert "[dsymutil][test] Check the updated dSYM instead of companion file." Revert "[dsymutil] Upstream update feature." llvm-svn: 324493
* [dsymutil][test] Check the updated dSYM instead of companion file.Jonas Devlieghere2018-02-072-5/+5
| | | | | | | | This patch has llvm-dwarfdump check the whole dSYM, rather than the hard-coded path to the Mach-O companion file. This might be what's causing the Windows bot to fail. llvm-svn: 324483
* [dsymutil] Upstream update feature.Jonas Devlieghere2018-02-073-0/+51
| | | | | | | | | | | Now that dsymutil can generate accelerator tables, we can upstream the update logic that, as the name implies, updates the accelerator tables in an existing dSYM bundle. In combination with `-minimize` this can be used to remove redundant .debug_(inlines|pubtypes|pubnames). Differential revision: https://reviews.llvm.org/D42880 llvm-svn: 324480
* [DWARF] Regularize dumping strings from line tables.Paul Robinson2018-02-053-9/+9
| | | | | | | | | | | | | | | | | The major visible difference here is that in line-table dumps, directory and file names are wrapped in double-quotes; previously, directory names got single quotes and file names were not quoted at all. The improvement in this patch is that when a DWARF v5 line table header has indirect strings, in a verbose dump these will all have their section[offset] printed as well as the name itself. This matches the format used for dumping strings in the .debug_info section. Differential Revision: https://reviews.llvm.org/D42802 llvm-svn: 324270
* [dsymutil] Enable -minimize feature.Jonas Devlieghere2018-01-302-0/+10
| | | | | | | | | | | | | Passing -minimize to dsymutil prevents the emission of .debug_inlines, .debug_pubnames, and .debug_pubtypes in favor of the Apple accelerator tables. The actual check in the DWARF linker was added in r323655. This patch simply enables it. Differential revision: https://reviews.llvm.org/D42688 llvm-svn: 323812
* [dsymutil] Generate Apple accelerator tablesJonas Devlieghere2018-01-294-2/+245
| | | | | | | | | | | This patch adds support for generating accelerator tables in dsymutil. This feature was already present in our internal repository but not yet upstreamed because it requires changes to the Apple accelerator table implementation. Differential revision: https://reviews.llvm.org/D42501 llvm-svn: 323655
* [DebugInfo] Unify dumping of address rangesJonas Devlieghere2018-01-163-27/+27
| | | | | | | | | | | | | | | Summary: This patch unifies the printing of address ranges as [0x0, 0x1). rdar://34822059 Reviewers: aprantl, dblaikie Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D42056 llvm-svn: 322543
* [dsymutil][test] Fix failing test when no lipo binary availableJonas Devlieghere2017-12-131-11/+0
| | | | | | | | The invocation without -no-output would try to lipo the different debug objects together. This wouldn't work on platforms that don't provide that utility. llvm-svn: 320605
* [dsymutil] Re-enable threadingJonas Devlieghere2017-12-132-1/+16
| | | | | | | | | | | | | | | | Threading was disabled in r317263 because it broke a test in combination with `-DLLVM_ENABLE_THREADS=OFF`. This was because a ThreadPool warning was piped to llvm-dwarfdump which was expecting to read an object from stdin. This patch re-enables threading and fixes the offending test. Unfortunately this required more than just moving the ThreadPool out of the for loop because of the TempFile refactoring that took place in the meantime. Differential revision: https://reviews.llvm.org/D41180 llvm-svn: 320601
* [dsymutil] Accept line tables up to DWARFv5.Jonas Devlieghere2017-12-124-0/+46
| | | | | | | | | | | This patch removes the hard-coded check for DWARFv2 line tables. Now dsymutil accepts line tables for DWARF versions 2 to 5 (inclusive). Differential revision: https://reviews.llvm.org/D41084 rdar://35968319 llvm-svn: 320469
* [dsymutil] Add -verify option to run DWARF verifier after linking.Jonas Devlieghere2017-12-072-0/+9
| | | | | | | | | | | This patch adds support for running the DWARF verifier on the linked debug info files. If the -verify options is specified and verification fails, dsymutil exists with abort with non-zero exit code. This behavior is *not* enabled by default. Differential revision: https://reviews.llvm.org/D40777 llvm-svn: 320033
* [dsymutil] Upstream getBundleInfo implementationJonas Devlieghere2017-11-302-0/+50
| | | | | | | | | | | | | This patch implements `getBundleInfo`, which uses CoreFoundation to obtain information about the CFBundle. This information is needed to populate the Plist in the dSYM bundle. This change only applies to darwin and is an NFC as far as other platforms are concerned. Differential revision: https://reviews.llvm.org/D40244 llvm-svn: 319416
* [llvm-dwarfdump] Display DW_AT_high_pc as absolute valueJonas Devlieghere2017-11-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | DWARF4 relative DW_AT_high_pc values are now displayed as absolute addresses. The relative value is only shown when explicitly dumping the forms, i.e. in show-form or verbose mode. ``` DW_AT_low_pc (0x0000000000000049) DW_AT_high_pc (0x00000019) ``` becomes ``` DW_AT_low_pc (0x0000000000000049) DW_AT_high_pc (0x0000000000000062) ``` Differential revision: https://reviews.llvm.org/D40317 rdar://35416943 llvm-svn: 319044
* [dsymutil][doc] Improve wording in manpage and rename file.Jonas Devlieghere2017-11-021-1/+1
| | | | | | | | | | - Improve wording - Rename llvm-dsymutil to dsymutil - Name -arch=<arch> argument Differential revision: https://reviews.llvm.org/D39561 llvm-svn: 317226
* [dsymutil][NFC} Rename thread related command line optionsJonas Devlieghere2017-11-011-1/+1
| | | | | | | | | | | This makes the command line options consistent with llvm-cov and llvm-profdata, which both use `-num-threads` and `-j`. This also addresses the conflict reported after landing D39355. Differential revision: https://reviews.llvm.org/D39496 llvm-svn: 317104
* [test] Fix dsymutil/cmdline.testJonas Devlieghere2017-10-311-1/+1
| | | | | | | This fixes dsymutil/cmdline.test on platforms where the dsymutil binary has an extension. llvm-svn: 317001
* [dsymutil] Implement the --threads optionJonas Devlieghere2017-10-311-0/+21
| | | | | | | | | | | | | | This patch adds the --threads option to dsymutil to process architectures in parallel. The feature is already present in the version distributed with Xcode, but was not yet upstreamed. This is NFC as far as the linking behavior is concerned. As threads are used automatically, the current tests cover the change in implementation. Differential revision: https://reviews.llvm.org/D39355 llvm-svn: 316999
* Re-land "[dsymutil] Timestmap verification for __swift_ast"Jonas Devlieghere2017-10-131-3/+8
| | | | | | | | | | This patch adds timestamp verification for swiftmodule files. A new flag is provided to allows us to disable this check in order to allow testing of this feature. Differential revision: https://reviews.llvm.org/D38686 llvm-svn: 315684
* Revert "[dsymutil] Timestmap verification for __swift_ast"Jonas Devlieghere2017-10-113-34/+3
| | | | | | This reverts commit r315456. llvm-svn: 315458
* [dsymutil] Timestmap verification for __swift_astJonas Devlieghere2017-10-113-3/+34
| | | | | | | | | | | | This patch adds timestamp verification for swiftmodule files. - A new flag is provided to allows us to continue testing of the code for embedding the__swift_ast. (git doesn't maintain timestamps) - Adds a new test for fat (arm) binaries. Differential revision: https://reviews.llvm.org/D38686 llvm-svn: 315456
* Re-land "[llvm-dwarfdump] Print type names in DW_AT_type DIEs"Jonas Devlieghere2017-10-105-44/+44
| | | | | | | | | | | | This patch adds printing for DW_AT_type DIEs like it is already the case for DW_AT_specification DIEs. This is a rather naive approach and only a start. We should have pretty printers for different languages. Recommit after being reverted in r315299. Differential revision: https://reviews.llvm.org/D36993 llvm-svn: 315316
* Revert "[llvm-dwarfdump] Print type names in DW_AT_type DIEs"Jonas Devlieghere2017-10-105-44/+44
| | | | | | This reverts commit r315297. llvm-svn: 315299
* [llvm-dwarfdump] Print type names in DW_AT_type DIEsJonas Devlieghere2017-10-105-44/+44
| | | | | | | | | | This patch adds printing for DW_AT_type DIEs like it is already the case for DW_AT_specification DIEs. This is a rather naive approach and only a start. We should have pretty printers for different languages. Differential revision: https://reviews.llvm.org/D36993 llvm-svn: 315297
* [dsymutil] Emit valid debug locations when no symbol flags are setFrancis Ricci2017-10-093-0/+37
| | | | | | | | | | | | | | | | | Summary: swiftc emits symbols without flags set, which led dsymutil to ignore them when searching for global symbols, causing dwarf location data to be omitted. Xcode's dsymutil handles this case correctly, and emits valid location data. Add this functionality to llvm-dsymutil by allowing parsing of symbols with no flags set. Reviewers: aprantl, friss, JDevlieghere Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38587 llvm-svn: 315218
* Revert "[dsymutil] Emit valid debug locations when no symbol flags are set"Francis Ricci2017-10-062-34/+0
| | | | | | This reverts commit r315082, which fails on non-darwin buildbots. llvm-svn: 315088
* [dsymutil] Emit valid debug locations when no symbol flags are setFrancis Ricci2017-10-062-0/+34
| | | | | | | | | | | | | | | | | Summary: swiftc emits symbols without flags set, which led dsymutil to ignore them when searching for global symbols, causing dwarf location data to be omitted. Xcode's dsymutil handles this case correctly, and emits valid location data. Add this functionality to llvm-dsymutil by allowing parsing of symbols with no flags set. Reviewers: aprantl, friss, JDevlieghere Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38587 llvm-svn: 315082
* [llvm-dsymutil] Add support for __swift_ast MachO DWARF sectionFrancis Ricci2017-10-063-0/+15
| | | | | | | | | | | | | | | | | | | | Summary: Xcode's dsymutil emits a __swift_ast DWARF section, which is required for debugging, and which contains a byte-for-byte dump of the swiftmodule file. Add this feature to llvm-dsymutil. Tested with `gobjdump --dwarf=info -s`, by verifying that the contents of `__DWARF.__swift_ast` match between Xcode's dsymutil and llvm-dsymutil (Xcode's dwarfdump and llvm-dwarfdump don't currently recognize the __swift_ast section). Reviewers: aprantl, friss Subscribers: llvm-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D38504 llvm-svn: 315066
* Revert "[llvm-dsymutil] Add support for __swift_ast MachO DWARF section"Francis Ricci2017-10-053-15/+0
| | | | | | | | Breaks aarch64 builders This reverts commit r315014. llvm-svn: 315034
* [dsymutil] Fix typo in swift-ast.testFrancis Ricci2017-10-051-1/+1
| | | | llvm-svn: 315017
* [llvm-dsymutil] Add support for __swift_ast MachO DWARF sectionFrancis Ricci2017-10-053-0/+15
| | | | | | | | | | | | | | | | | | | | Summary: Xcode's dsymutil emits a __swift_ast DWARF section, which is required for debugging, and which contains a byte-for-byte dump of the swiftmodule file. Add this feature to llvm-dsymutil. Tested with `gobjdump --dwarf=info -s`, by verifying that the contents of `__DWARF.__swift_ast` match between Xcode's dsymutil and llvm-dsymutil (Xcode's dwarfdump and llvm-dwarfdump don't currently recognize the __swift_ast section). Reviewers: aprantl, friss Subscribers: llvm-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D38504 llvm-svn: 315014
* Revert "[llvm-dsymutil] Add support for __swift_ast MachO DWARF section"Francis Ricci2017-10-053-15/+0
| | | | | | This reverts commit r315004, because of a failing test on non-apple platforms llvm-svn: 315009
* [llvm-dsymutil] Add support for __swift_ast MachO DWARF sectionFrancis Ricci2017-10-053-0/+15
| | | | | | | | | | | | | | | | | | | | Summary: Xcode's dsymutil emits a __swift_ast DWARF section, which is required for debugging, and which contains a byte-for-byte dump of the swiftmodule file. Add this feature to llvm-dsymutil. Tested with `gobjdump --dwarf=info -s`, by verifying that the contents of `__DWARF.__swift_ast` match between Xcode's dsymutil and llvm-dsymutil (Xcode's dwarfdump and llvm-dwarfdump don't currently recognize the __swift_ast section). Reviewers: aprantl, friss Subscribers: llvm-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D38504 llvm-svn: 315004
* [dsymutil] Better support for symbol aliasesJonas Devlieghere2017-09-264-0/+19
| | | | | | | | | | | This patch adds logic to follow a symbol's aliases when the symbol name cannot be found in the current object file. It checks the main binary for the symbol's address and queries the current object for its aliases (symbols with the same address) before printing out a warning. Differential revision: https://reviews.llvm.org/D38230 llvm-svn: 314198
OpenPOWER on IntegriCloud