summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Recommit "[DWARFv5] Dump an MD5 checksum in the line-table header.""Paul Robinson2017-12-152-39/+14
| | | | | | | This reverts commit 0afef672f63f0e4e91938656bc73424a8c058bfc. Still failing at runtime on bots. llvm-svn: 320888
* Recommit "[DWARFv5] Dump an MD5 checksum in the line-table header."Paul Robinson2017-12-152-14/+39
| | | | | | | | | | | Adds missing support for DW_FORM_data16. Update of r320852, fixing the unittest to use a hand-coded struct instead of std::array to guarantee data layout. Differential Revision: https://reviews.llvm.org/D41090 llvm-svn: 320886
* Revert "[DWARFv5] Dump an MD5 checksum in the line-table header."Paul Robinson2017-12-152-39/+14
| | | | | | Unit test fails on some bots. llvm-svn: 320857
* [DWARFv5] Dump an MD5 checksum in the line-table header.Paul Robinson2017-12-152-14/+39
| | | | | | | | Adds missing support for DW_FORM_data16. Differential Revision: https://reviews.llvm.org/D41090 llvm-svn: 320852
* Remove redundant includes from lib/DebugInfo.Michael Zolotukhin2017-12-133-4/+0
| | | | llvm-svn: 320620
* [dwarfdump] Fix off-by-one bug in accelerator table extractor.Jonas Devlieghere2017-12-113-8/+14
| | | | | | | | | | | | | | | This fixes a bug where the verifier was complaining about empty accelerator tables. When the table is empty, its size is not a valid offset as it points after the end of the section. This patch also makes the extractor return llvm:Error instead of bool for better error reporting in the verifier. Differential revision: https://reviews.llvm.org/D41063 rdar://35932007 llvm-svn: 320399
* dwarfdump: Add support for the --diff option.Adrian Prantl2017-12-082-21/+29
| | | | | | | | | --diff Emit the output in a diff-friendly way by omitting offsets and addresses. <rdar://problem/34502625> llvm-svn: 320214
* [DebugInfo] Bail out if making no progress dumping line tables.Paul Robinson2017-12-011-0/+4
| | | | llvm-svn: 319564
* llvm-dwarfdump: honor the --show-children option when dumping a specific DIE.Adrian Prantl2017-11-291-1/+1
| | | | llvm-svn: 319271
* Fixed the ability to recursively get an attribute value from a DWARFDie.Greg Clayton2017-11-271-10/+9
| | | | | | | | The previous implementation would only look 1 DW_AT_specification or DW_AT_abstract_origin deep. This means DWARFDie::getName() would fail in certain cases. I ran into such a case while creating a tool that used the LLVM DWARF parser to generate a symbolication format so I have seen this in the wild. Differential Revision: https://reviews.llvm.org/D40156 llvm-svn: 319104
* [llvm-dwarfdump] Display DW_AT_high_pc as absolute valueJonas Devlieghere2017-11-271-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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
* [DwarfDump] -debug-line=offset applies to .dwo too.Paul Robinson2017-11-221-1/+3
| | | | llvm-svn: 318856
* [DebugInfo] Dump a .debug_line section, including line-number program,Paul Robinson2017-11-222-5/+18
| | | | | | | | without any compile units. Differential Revision: https://reviews.llvm.org/D40114 llvm-svn: 318842
* [DWARFv5] Support DW_FORM_strp in the .debug_line.dwo header.Paul Robinson2017-11-222-33/+70
| | | | | | | | | | | As a side effect, the .debug_line section will be dumped in physical order, rather than in the order that compile units refer to their associated portions of the .debug_line section. These are probably always the same order anyway, and no tests noticed the difference. Differential Revision: https://reviews.llvm.org/D39854 llvm-svn: 318839
* [DWARF] Fix handling of extended line-number opcodesPaul Robinson2017-11-221-5/+24
| | | | | | Differential Revision: https://reviews.llvm.org/D40200 llvm-svn: 318838
* [DWARFv5] Support DW_FORM_strp in the .debug_line header.Paul Robinson2017-11-076-27/+31
| | | | | | | | Supporting this form in .debug_line.dwo will be done as a follow-up. Differential Revision: https://reviews.llvm.org/D33155 llvm-svn: 317607
* Revert "[DWARF] Now that Optional is standard layout, put it into an union ↵Benjamin Kramer2017-10-311-2/+2
| | | | | | | | instead of splatting it." GCC doesn't like it. This reverts commit r317028. llvm-svn: 317030
* [DWARF] Now that Optional is standard layout, put it into an union instead ↵Benjamin Kramer2017-10-311-2/+2
| | | | | | | | of splatting it. No functionality change intended. llvm-svn: 317028
* Fix BB after r316756 "[llvm-dwarfdump] - Teach verifier to report broken ↵George Rimar2017-10-271-1/+1
| | | | | | | | | | | DWARF expressions." Bot: http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/6255 Changed format of this message by mistake. llvm-svn: 316757
* [llvm-dwarfdump] - Teach verifier to report broken DWARF expressions.George Rimar2017-10-272-29/+45
| | | | | | | | | | | | | Patch improves next things: * Fixes assert/crash in getOpDesc when giving it a invalid expression op code. * DWARFExpression::print() called DWARFExpression::Operation::getEndOffset() which returned and used uninitialized field EndOffset. Patch fixes that. * Teaches verifier to verify DW_AT_location and error out on broken expressions. Differential revision: https://reviews.llvm.org/D39294 llvm-svn: 316756
* Re-land "[dwarfdump] Add -lookup option"Jonas Devlieghere2017-10-252-2/+30
| | | | | | | | | Add the option to lookup an address in the debug information and print out the file, function, block and line table details. Differential revision: https://reviews.llvm.org/D38409 llvm-svn: 316619
* [llvm-dwarfdump] - Fix array out of bounds access crash.George Rimar2017-10-252-0/+17
| | | | | | | | | | | This fixes possible out of bound access in DWARFDie::getFirstChild() which might happen when .debug_info section is corrupted, like shown in testcase. Differential revision: https://reviews.llvm.org/D39185 llvm-svn: 316566
* [llvm-dwarfdump] - Teach tool about few GNU call_sites constants.George Rimar2017-10-231-1/+2
| | | | | | | | | | | | | | This teaches tool about following consants: DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter, DW_AT_GNU_call_site_value, DW_AT_GNU_all_call_sites. Constants documented here: https://sourceware.org/elfutils/DwarfExtensions Differential revision: https://reviews.llvm.org/D39119 llvm-svn: 316321
* [llvm-dwarfdump] - Teach tool to parse DW_CFA_GNU_args_size.George Rimar2017-10-161-0/+1
| | | | | | | | | Currently llvm-dwarfdump runs into llvm_unreachable when faces DW_CFA_GNU_args_size. Patch implements the support. Differential revision: https://reviews.llvm.org/D38879 llvm-svn: 315897
* Re-land "[llvm-dwarfdump] Print type names in DW_AT_type DIEs"Jonas Devlieghere2017-10-102-6/+66
| | | | | | | | | | | | 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-101-62/+0
| | | | | | This reverts commit r315297. llvm-svn: 315299
* [llvm-dwarfdump] Print type names in DW_AT_type DIEsJonas Devlieghere2017-10-101-0/+62
| | | | | | | | | | 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
* [dwarfdump] Verify that unit type matches root DIEJonas Devlieghere2017-10-061-8/+24
| | | | | | | | | | | | | This patch adds two new verifiers: - It checks that the root DIE of a CU is actually a valid unit DIE. (based on its tag) - For DWARF5 which contains a unit type int he CU header, it checks that this matches the type of the unit DIE. Differential revision: https://reviews.llvm.org/D38453 llvm-svn: 315121
* clang-format file.Adrian Prantl2017-10-041-30/+27
| | | | llvm-svn: 314942
* delete commented out code.Adrian Prantl2017-10-041-2/+0
| | | | llvm-svn: 314941
* Revert r314817 "[dwarfdump] Add -lookup option"Hans Wennborg2017-10-032-30/+2
| | | | | | | | | | | | | | | | | The test fails on Linux; see follow-up email on the llvm-commits list. > Add the option to lookup an address in the debug information and print > out the file, function, block and line table details. > > Differential revision: https://reviews.llvm.org/D38409 This also reverts the follow-up r314818: > [test] Fix llvm-dwarfdump/cmdline.test > > Fixes test/tools/llvm-dwarfdump/cmdline.test llvm-svn: 314825
* [dwarfdump] Add -lookup optionJonas Devlieghere2017-10-032-2/+30
| | | | | | | | | Add the option to lookup an address in the debug information and print out the file, function, block and line table details. Differential revision: https://reviews.llvm.org/D38409 llvm-svn: 314817
* [dwarfdump] Add -show-formJonas Devlieghere2017-10-021-1/+1
| | | | | | | | | This enables printing of DWARF form types after the DWARF attribute types. Differential revision: https://reviews.llvm.org/D38459 llvm-svn: 314685
* [dwarfdump][NFC] Consistent printing of address rangesJonas Devlieghere2017-09-292-8/+8
| | | | | | | | | | | | | | 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-293-88/+118
| | | | | | | | | | | 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-15/+13
| | | | llvm-svn: 314481
* llvm-dwarfdump: add support for .apple_types in --findAdrian Prantl2017-09-291-2/+6
| | | | llvm-svn: 314479
* llvm-dwarfdump: implement --find for .apple_namesAdrian Prantl2017-09-282-3/+87
| | | | | | | | | | | | 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-3/+8
| | | | | | | | | 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-1/+1
| | | | | | | | | 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/+3
| | | | | | | | 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-6/+48
| | | | | | | | 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-261-0/+4
| | | | | | | | | | | | | | | | | | | 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 verbose output for .debug-line sectionJonas Devlieghere2017-09-212-8/+83
| | | | | | | | | | | | 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-212-16/+33
| | | | llvm-svn: 313900
* [DWARF] Shrink AttributeSpec from 24 to 16 bytes.Benjamin Kramer2017-09-211-11/+10
| | | | | | | This is a bit ugly because we can't put Optional into a union. Hide all of that behind a set of accessors and make accesses safer using asserts. llvm-svn: 313884
* llvm-dwarfdump: implement --recurse-depth=<N>Adrian Prantl2017-09-205-21/+24
| | | | | | | | | | 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
* dwarfdump/symbolizer: Avoid loading unneeded CUs from a DWPDavid Blaikie2017-09-193-9/+11
| | | | | | | | When symbolizing large binaries, parsing every CU in a DWP file is a significant performance penalty. Instead, use the index to only load the CUs that are needed. llvm-svn: 313659
* dwarfdump: Delay parsing abbreviations until they're neededDavid Blaikie2017-09-192-10/+33
| | | | | | | | | | | This speeds up dumping specific DIEs by not parsing abbreviations for units that are not used. (this is also handy to have in eventually to speed up llvm-symbolizer for .dwp files, where parsing most of the DWP file can be avoided by using the index) llvm-svn: 313635
* llvm-dwarfdump: use more efficient API (NFC)Adrian Prantl2017-09-181-4/+4
| | | | llvm-svn: 313573
OpenPOWER on IntegriCloud