summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [DWARFDebugRnglists] Add a callback-based version of the getAbsoluteRanges ↵Pavel Labath2019-12-041-2/+11
| | | | | | | | | | | | | | | | | | | | function Summary: The dump() function already accepts a callback. This makes getAbsoluteRanges do the same. The existing DWARFUnit overload is implemented on top of the new function. This enables usage of the debug_rnglists parser from within lldb (which has it's own dwarf parser). Reviewers: dblaikie, JDevlieghere, aprantl Subscribers: hiraditya, probinson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70952
* Switch LLVM to use 64-bit offsets (2/5)Igor Kudrin2019-08-061-15/+15
| | | | | | | | | This updates all libraries and tools in LLVM Core to use 64-bit offsets which directly or indirectly come to DataExtractor. Differential Revision: https://reviews.llvm.org/D65638 llvm-svn: 368014
* [DWARF] Delete a stray break and a stray comment. NFCFangrui Song2019-03-231-2/+1
| | | | llvm-svn: 356838
* [DebugInfo] add SectionedAddress to DebugInfo interfaces.Alexey Lapshin2019-02-271-4/+3
| | | | | | | | | | | | | | | | | That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703 "wrong line number info for obj file compiled with -ffunction-sections" bug. The problem happened with only .o files. If object file contains several .text sections then line number information showed incorrectly. The reason for this is that DwarfLineTable could not detect section which corresponds to specified address(because address is the local to the section). And as the result it could not select proper sequence in the line table. The fix is to pass SectionIndex with the address. So that it would be possible to differentiate addresses from various sections. With this fix llvm-objdump shows correct line numbers for disassembled code. Differential review: https://reviews.llvm.org/D58194 llvm-svn: 354972
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [llvm-dwarfdump] - Stop printing the bogus empty section name on invalid dwarf.George Rimar2018-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | When there is no .debug_addr section for some reason, llvm-dwarfdump would print the bogus empty section name when dumping ranges in .debug_info: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x00000004 [0x0000000000000000, 0x0000000000000001) "" [0x0000000000000000, 0x0000000000000002) "") That happens because of the code which uses 0 (zero) as a section index as a default value. The code should use -1ULL instead because technically 0 is a valid zero section index in ELF and -1ULL is a special constant used that means "no section available". This is mostly a fix for the overall correctness/safety of the code, but a test case is provided too. Differential revision: https://reviews.llvm.org/D55113 llvm-svn: 348115
* [DWARF] Revert r345546: Refactor range list extraction and dumpingWolfgang Pieb2018-10-311-74/+22
| | | | | | This patch caused some internal tests to break which are being investigated. llvm-svn: 345687
* [DWARF][NFC] Refactor range list extraction and dumpingWolfgang Pieb2018-10-291-22/+74
| | | | | | | | | | | | | | | | | The purpose of this patch is twofold: - Fold pre-DWARF v5 functionality into v5 to eliminate the need for 2 different versions of range list handling. We get rid of DWARFDebugRangelist{.cpp,.h}. - Templatize the handling of range list tables so that location list handling can take advantage of it as well. Location list and range list tables have the same basic layout. A non-NFC version of this patch was previously submitted with r342218, but it caused errors with some TSan tests. This patch has no functional changes. The difference to the non-NFC patch is that there are no changes to rangelist dumping in this patch. Differential Revision: https://reviews.llvm.org/D53545 llvm-svn: 345546
* llvm-dwarfdump: Support RLE_addressx and RLE_startx_length in .debug_rnglistsDavid Blaikie2018-10-201-15/+65
| | | | llvm-svn: 344835
* DebugInfo: Use debug_addr for non-dwo addresses in DWARF 5David Blaikie2018-10-201-1/+1
| | | | | | | | Putting addresses in the address pool, even with non-fission, can reduce relocations - reusing the addresses from debug_info and debug_rnglists (the latter coming soon) llvm-svn: 344834
* Revert "[DWARF] reposting r342048, which was reverted in r342056 due to ↵Alexander Kornienko2018-09-171-73/+24
| | | | | | | | | buildbot errors. Adjusted 2 test cases for ARM and darwin and fixed a bug with the original change in dsymutil." This reverts commit r342218. Due to a number of failures under TSAN. An isolated test case is being worked on. llvm-svn: 342399
* [DWARF] reposting r342048, which was reverted in r342056 due to buildbot Wolfgang Pieb2018-09-141-24/+73
| | | | | | | | errors. Adjusted 2 test cases for ARM and darwin and fixed a bug with the original change in dsymutil. llvm-svn: 342218
* Reverting r342048, which caused UBSan failures in dsymutil.Wolfgang Pieb2018-09-121-73/+24
| | | | llvm-svn: 342056
* [DWARF] Refactoring range list dumping to fold DWARF v4 functionality into ↵Wolfgang Pieb2018-09-121-24/+73
| | | | | | | | | | | | | v5 handling Eliminating some duplication of rangelist dumping code at the expense of some version-dependent code in dump and extract routines. Reviewer: dblaikie, JDevlieghere, vleschuk Differential revision: https://reviews.llvm.org/D51081 llvm-svn: 342048
* [DWARF] Refactor DWARF classes to use unified error reporting. NFC.Victor Leschuk2018-08-201-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | DWARF-related classes in lib/DebugInfo/DWARF contained duplicating code for creating StringError instances, like: template <typename... Ts> static Error createError(char const *Fmt, const Ts &... Vals) { std::string Buffer; raw_string_ostream Stream(Buffer); Stream << format(Fmt, Vals...); return make_error<StringError>(Stream.str(), inconvertibleErrorCode()); } Similar function was placed in Support lib in https://reviews.llvm.org/D49824 This revision makes DWARF classes use this function instead of their local implementation of it. Reviewers: aprantl, dblaikie, probinson, wolfgangp, JDevlieghere, jhenderson Reviewed By: JDevlieghere, jhenderson Differential Revision: https://reviews.llvm.org/D49964 llvm-svn: 340163
* Embed a template specialization in a namespace to work around a gcc bug.Wolfgang Pieb2018-07-231-0/+2
| | | | llvm-svn: 337770
* [DWARF v5] Refactor range lists dumping by using a more generic way of ↵Wolfgang Pieb2018-07-231-189/+21
| | | | | | | | | | | | | handling tables of lists. The intent is to use it for location list tables as well. Change is almost NFC with the exception of the spelling of some strings used during dumping (all lowercase now). Reviewer: JDevlieghere Differential Revision: https://reviews.llvm.org/D49500 llvm-svn: 337763
* [DWARF] Improved error reporting for range lists. Wolfgang Pieb2018-06-201-5/+5
| | | | | | | | | | | Errors found processing the DW_AT_ranges attribute are propagated by lower level routines and reported by their callers. Reviewer: JDevlieghere Differential Revision: https://reviews.llvm.org/D48344 llvm-svn: 335188
* Fixing buildbot error introduced with r332759.Wolfgang Pieb2018-05-181-1/+1
| | | | llvm-svn: 332772
* [DWARF v5] Improved support for .debug_rnglists (consumer). Enables any ↵Wolfgang Pieb2018-05-181-5/+69
| | | | | | | | | | | | consumer to extract DWARF v5 encoded rangelists. Reviewer: JDevlieghere Differential Revision: https://reviews.llvm.org/D45549 llvm-svn: 332759
* [DWARF v5][NFC]: Refactor DebugRnglists to prepare for the support of the ↵Wolfgang Pieb2018-04-051-98/+127
| | | | | | | | | | | | DW_AT_ranges attribute in conjunction with .debug_rnglists. Reviewers: JDevlieghere Differential Revision: https://reviews.llvm.org/D45307 llvm-svn: 329345
* [DWARF][DWARF v5]: Adding support for dumping DW_RLE_offset_pair and ↵Wolfgang Pieb2018-03-271-19/+48
| | | | | | | | | | DW_RLE_base_address Reviewers: dblakie, aprantl Differential Revision: https://reviews.llvm.org/D44811 llvm-svn: 328662
* [DebugInfo] Move RangeListEntries instead of copying.Benjamin Kramer2018-03-081-2/+2
| | | | | | | This is needed for correctness as RangeListEntry is not copy-assignable, which std::vector might rely on. llvm-svn: 327067
* Fix compilation failure with MSVC.Zachary Turner2018-03-081-1/+1
| | | | llvm-svn: 327063
* [DWARF v5] Support for verbose dumping of .debug_rnglist entriesWolfgang Pieb2018-03-081-23/+78
| | | | | | | | | | | | | | | | Adding verbose dumping to the recent implementation of dumping of v5 range list entries. We're capturing the entries as is as they come in during extraction, including their file offset, so we can dump them in more detail. The offset table entries which are table-relative are shown as is (as in non-verbose mode) and with the actual file offset they map to. Reviewers: dblaikie, aprantl, jdevlieghere, jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43366 llvm-svn: 327059
* Fix more print format specifiers in debug_rnglists dumpingJames Henderson2018-02-051-4/+6
| | | | | | | | | See also r324096. I have made the assumption that DWARF64 is not an issue for the time being with these fixes. llvm-svn: 324223
* Fix MSVC signed/unsigned comparison warning. NFCI.Simon Pilgrim2018-02-031-1/+1
| | | | llvm-svn: 324171
* Fix type sizes that were causing incorrect string formattingJames Henderson2018-02-021-2/+2
| | | | llvm-svn: 324096
* Add missing new files from r324077James Henderson2018-02-021-0/+192
Differential Revision: https://reviews.llvm.org/D42481 llvm-svn: 324078
OpenPOWER on IntegriCloud