summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-dwarfdump
Commit message (Collapse)AuthorAgeFilesLines
...
* [dwarfdump] Add -show-formJonas Devlieghere2017-10-022-1/+42
| | | | | | | | | This enables printing of DWARF form types after the DWARF attribute types. Differential revision: https://reviews.llvm.org/D38459 llvm-svn: 314685
* llvm-dwarfdump: implement the --name lookup option.Adrian Prantl2017-09-303-1/+41
| | | | llvm-svn: 314576
* [dwarfdump][NFC] Consistent printing of address rangesJonas Devlieghere2017-09-291-1/+1
| | | | | | | | | | | | | | This implement the insertion operator for DWARF address ranges so they are consistently printed as [LowPC, HighPC). While a dump method might have felt more consistent, it is used exclusively for printing error messages in the verifier and never used for actual dumping. Hence this approach is more intuitive and creates less clutter at the call sites. Differential revision: https://reviews.llvm.org/D38395 llvm-svn: 314523
* [dwarfdump][NFC] Consistent errors and warnings with --verifyJonas Devlieghere2017-09-295-20/+19
| | | | | | | | | | | This patch introduces 3 helper functions: error(), warn() and note() to make printing during verification more consistent. When supported, the respective prefixes are printed in color using the same color scheme as clang. Differential revision: https://reviews.llvm.org/D38368 llvm-svn: 314498
* llvm-dwarfdump: support .apple-namespaces in --findAdrian Prantl2017-09-291-0/+7
| | | | llvm-svn: 314481
* llvm-dwarfdump: add support for .apple_types in --findAdrian Prantl2017-09-291-0/+9
| | | | llvm-svn: 314479
* llvm-dwarfdump: implement --find for .apple_namesAdrian Prantl2017-09-282-0/+29
| | | | | | | | | | | | This patch implements the dwarfdump option --find=<name>. This option looks for a DIE in the accelerator tables and dumps it if found. This initial patch only adds support for .apple_names to keep the review small, adding the other sections and pubnames support should be trivial though. Differential Revision: https://reviews.llvm.org/D38282 llvm-svn: 314439
* [dwarfdump] Verify that CUs have a unit DIE.Jonas Devlieghere2017-09-281-0/+21
| | | | | | | | | This patch adds a check to the DWARF verifier to detect CUs without a unit DIE. Differential revision: https://reviews.llvm.org/D38363 llvm-svn: 314426
* [dwarfdump] Fix printing of .debug_line offset.Jonas Devlieghere2017-09-271-4/+4
| | | | | | | | | Fixes 32-bit buildbots: http://bb.pgr.jp/builders/test-llvm-i686-linux-RA/builds/542 http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/11533 http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15/builds/11494 llvm-svn: 314291
* [dwarfdump] Add support for -debug-line=OFFSETJonas Devlieghere2017-09-271-0/+28
| | | | | | | | This patch adds support for passing an offset to -debug-line. Differential revision: https://reviews.llvm.org/D38240 llvm-svn: 314288
* [dwarfdump] Add support for -debug-loc=OFFSETJonas Devlieghere2017-09-272-0/+294
| | | | | | | | This patch adds support for passing an offset to -debug-loc. Differential revision: https://reviews.llvm.org/D38237 llvm-svn: 314286
* [dwarfdump] Skip 'stripped' sectionsJonas Devlieghere2017-09-262-0/+11
| | | | | | | | | | | | | | | | | | | When dsymutil generates the companion file, its strips all unnecessary sections by omitting their body and setting the offset in their corresponding load command to zero. One such section is the .eh_frame section, as it contains runtime information rather than debug information and is part of the __TEXT segment. When reading this section, we would just read the number of bytes specified in the load command, starting from offset 0 (i.e. the beginning of the file). Rather than trying to parse this obviously invalid section, dwarfdump now skips this. Differential revision: https://reviews.llvm.org/D38135 llvm-svn: 314208
* [dwarfdump] Add support for redirecting output to a fileJonas Devlieghere2017-09-221-0/+3
| | | | | | | | | This patch adds the -o and --out-file options for compatibility with Darwin's dwarfdump. Differential revision: https://reviews.llvm.org/D38125 llvm-svn: 313969
* [dwarfdump] Add verbose output for .debug-line sectionJonas Devlieghere2017-09-212-4/+36
| | | | | | | | | | | | This patch adds dumping of line table instructions as well as the final state at each specified pc value in verbose mode. This is essentially the same as the default in Darwin's dwarfdump. Dumping the actual line table opcodes can be particularly useful for something like debugging a bad `.debug_line` section. Differential revision: https://reviews.llvm.org/D37971 llvm-svn: 313910
* llvm-dwarfdump support --debug-frame=<offset> and --eh-frame=<offset>Adrian Prantl2017-09-211-0/+14
| | | | llvm-svn: 313900
* llvm-dwarfdump: Add support for the --arch command line option.Adrian Prantl2017-09-211-1/+14
| | | | llvm-svn: 313888
* llvm-dwarfdump: move -eh-frame into the right section in the help output.Adrian Prantl2017-09-201-0/+1
| | | | llvm-svn: 313836
* llvm-dwarfdump: implement --recurse-depth=<N>Adrian Prantl2017-09-203-0/+30
| | | | | | | | | | This patch implements the Darwin dwarfdump option --recurse-depth=<N>, which limits the recursion depth when selectively printing DIEs at an offset. Differential Revision: https://reviews.llvm.org/D38064 llvm-svn: 313778
* llvm-dwarfdump: un-hide more command line optionsAdrian Prantl2017-09-191-0/+5
| | | | llvm-svn: 313673
* Move test into non-target-specific directory.Adrian Prantl2017-09-191-0/+0
| | | | llvm-svn: 313672
* Fix test to not depend on another subdirectories Input directoryDavid Blaikie2017-09-192-2/+51
| | | | | | | | Inputs should be placed local to the test (or possibly in a common parent? I think we do that in some places - but the only common parent between these two directories is 'test' which seems a bit overly broad). llvm-svn: 313662
* llvm-dwarfdump: add a --show-parents options when selectively dumping DIEs.Adrian Prantl2017-09-181-0/+15
| | | | llvm-svn: 313567
* Fix typo in testcase.Adrian Prantl2017-09-181-3/+3
| | | | llvm-svn: 313566
* llvm-dwarfdump: support a --show-children optionAdrian Prantl2017-09-162-1/+22
| | | | | | | This will print all children of a DIE when selectively printing only one DIE at a given offset. llvm-svn: 313464
* llvm-dwarfdump: Add support for -debug-types=<offset>.Adrian Prantl2017-09-161-0/+8
| | | | llvm-svn: 313463
* llvm-dwarfdump: Add support for -debug-info=<offset>.Adrian Prantl2017-09-151-0/+10
| | | | | | | | | This is the first of many commits that enable selectively dumping just one record from the debug info. This reapplies r313412 with some extra qualification to appease GCC and MSVC. llvm-svn: 313419
* Revert "llvm-dwarfdump: Add support for -debug-info=<offset>."Adrian Prantl2017-09-151-10/+0
| | | | | | This reverts commit r313412 because of a g++ incompatibility. llvm-svn: 313413
* llvm-dwarfdump: Add support for -debug-info=<offset>.Adrian Prantl2017-09-151-0/+10
| | | | | | | This is the first of many commits that enable selectively dumping just one record from the debug info. llvm-svn: 313412
* llvm-dwarfdump: support dumping static archives.Adrian Prantl2017-09-141-0/+5
| | | | llvm-svn: 313272
* llvm-dwarfdump: support dumping UUIDs of Mach-O binaries.Adrian Prantl2017-09-133-0/+405
| | | | | | | This is a feature supported by Darwin dwarfdump. UUIDs are used to associate executables with their .dSYM bundles. llvm-svn: 313165
* [dwarfdump] Rename Brief to Verbose in DIDumpOptionsJonas Devlieghere2017-09-131-4/+4
| | | | | | | | | | | This patches renames "brief" to "verbose" in de DIDumpOptions and inverts the logic to match the new behavior where brief is the default. Changing the default value uncovered some bugs related to the DIDumpOptions not being propagated and have been fixed as well. Differential revision: https://reviews.llvm.org/D37745 llvm-svn: 313139
* Fix dwarfdump cmdline test on WindowsReid Kleckner2017-09-131-1/+1
| | | | llvm-svn: 313110
* Clean up the --help output of llvm-dwarfdump by hiding irrelevant options.Adrian Prantl2017-09-121-0/+9
| | | | llvm-svn: 313085
* llvm-dwarfdump: Make -brief the default and add a -verbose option instead.Adrian Prantl2017-09-111-4/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D37717 llvm-svn: 312972
* llvm-dwarfdump: Replace -debug-dump=sect option with individual options.Adrian Prantl2017-09-112-1/+10
| | | | | | | | | | | | | | | | | | | | | | As discussed on llvm-dev in http://lists.llvm.org/pipermail/llvm-dev/2017-September/117301.html this changes the command line interface of llvm-dwarfdump to match the one used by the dwarfdump utility shipping on macOS. In addition to being shorter to type this format also has the advantage of allowing more than one section to be specified at the same time. In a nutshell, with this change $ llvm-dwarfdump --debug-dump=info $ llvm-dwarfdump --debug-dump=apple-objc becomes $ dwarfdump --debug-info --apple-objc Differential Revision: https://reviews.llvm.org/D37714 llvm-svn: 312970
* [llvm-dwarfdump] Brief mode only dumps debug_info by defaultJonas Devlieghere2017-08-311-2/+9
| | | | | | | | | | | | This patch changes the default behavior in brief mode to only show the debug_info section. This is undoubtedly the most popular and likely the one you'd want in brief mode. Non-brief mode behavior is not affected and still defaults to all. Differential revision: https://reviews.llvm.org/D37334 llvm-svn: 312252
* Revert "[llvm-dwarfdump] Print type names in DW_AT_type DIEs"Jonas Devlieghere2017-08-221-317/+0
| | | | | | This reverts commit r311492. llvm-svn: 311499
* [llvm-dwarfdump] Print type names in DW_AT_type DIEsJonas Devlieghere2017-08-221-0/+317
| | | | | | | This patch adds printing for DW_AT_type DIEs like it's currently already the case for DW_AT_specification DIEs. llvm-svn: 311492
* [llvm-dwarfdump] Hide .debug_str and DIE reference offsets in brief modeJonas Devlieghere2017-08-181-28/+116
| | | | | | | | | This patch hides the .debug_str offset and DIE reference offsets into the CU when llvm-dwarfdump is invoked with -brief. Differential Revision: https://reviews.llvm.org/D36835 llvm-svn: 311201
* [DWARF] Added verification check for tags in accelerator tables. This patch ↵Spyridoula Gravani2017-07-311-0/+128
| | | | | | | | verifies that the atom tag is actually the same with the tag of the DIE that we retrieve from the table. Differential Revision: https://reviews.llvm.org/D35963 llvm-svn: 309596
* [DWARF] Generalized verification of .apple_names accelerator table to be ↵Spyridoula Gravani2017-07-263-9/+9
| | | | | | | | applicable to any acceleration table. Added verification for .apple_types, .apple_namespaces and .apple_objc sections. Differential Revision: https://reviews.llvm.org/D35853 llvm-svn: 309068
* [DWARF] Modified test for die ranges verification so that it doesn't fail on ↵Spyridoula Gravani2017-07-251-2/+2
| | | | | | windows hosts. llvm-svn: 308943
* [DWARF] Added verification check for die ranges. If highPC is an address, ↵Spyridoula Gravani2017-07-241-0/+82
| | | | | | | | then it should be greater than lowPC for each range. Differential Revision: https://reviews.llvm.org/D35733 llvm-svn: 308928
* [DWARF] Generalized verification of .debug_abbrev to be applicable to both ↵Spyridoula Gravani2017-07-212-5/+46
| | | | | | | | .debug_abbrev and .debug_abbrev.dwo sections. Differential Revision: https://reviews.llvm.org/D35698 llvm-svn: 308703
* [DWARF] Added check that verifies that no abbreviation declaration has more ↵Spyridoula Gravani2017-07-201-2/+4
| | | | | | | | | | | | | than one attribute with the same name. SUMMARY This patch adds a verification check on the abbreviation declarations in the .debug_abbrev section. The check makes sure that no abbreviation declaration has more than one attributes with the same name. Differential Revision: https://reviews.llvm.org/D35643 llvm-svn: 308579
* [DWARF] Modification of code for the verification of .debug_info section.Spyridoula Gravani2017-07-181-0/+193
| | | | | | | | | | | | | | | Summary: This patch modifies the handleDebugInfo() function so that we verify the contents of each unit in the .debug_info section only if its header has been successfully verified. This change will allow for more/different verification checks depending on the type of the unit since from dwarf5, the .debug_info section may consist of different types of units. Subscribers: aprantl Differential Revision: https://reviews.llvm.org/D35521 llvm-svn: 308245
* [DWARF] Introduce verification for the unit header chain in .debug_info ↵Spyridoula Gravani2017-07-131-0/+81
| | | | | | | | | | | | | | | section to llvm-dwarfdump. This patch adds verification checks for the unit header chain in the .debug_info section. Specifically, for each unit in the .debug_info section, the verifier checks that: The unit length is valid (i.e. the unit can actually fit in the .debug_info section) The dwarf version of the unit is valid The address size is valid (4 or 8) The unit type (if the unit is in dwarf5) is valid The debug_abbrev_offset is valid llvm-svn: 307975
* [DWARF] Added verification checks for the .apple_names section.Spyridoula Gravani2017-06-296-366/+214
| | | | | | | | This patch verifies the number of atoms, the validity of the form for each atom, as well as the validity of the hashdata. For hashdata, we're verifying that the hashdata offset is correct and that the offset in the .debug_info for each DIE in the hashdata is also valid. llvm-svn: 306735
* [DWARF] Corrected behavior for when no .apple_names section is present in ↵Spyridoula Gravani2017-06-162-1/+175
| | | | | | | | | | the object. The verifier should not output any message in such a case. Added test case with no .apple_name section in the file to verify new functionality. Made existing test case more specific. llvm-svn: 305597
* Added partial verification for .apple_names accelerator table in ↵Spyridoula Gravani2017-06-141-0/+192
| | | | | | | | | | | llvm-dwarfdump output. This patch adds code which verifies that each bucket in the .apple_names accelerator table is either empty or has a valid hash index. Differential Revision: https://reviews.llvm.org/D34177 llvm-svn: 305344
OpenPOWER on IntegriCloud