summaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
AgeCommit message (Collapse)Author
2022-12-05[DebugInfo] llvm::Optional => std::optionalFangrui Song
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-02[DebugInfo] Use std::nullopt instead of None (NFC)Kazu Hirata
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-02-15Cleanup LLVMDWARFDebugInfoserge-sans-paille
As usual with that header cleanup series, some implicit dependencies now need to be explicit: llvm/DebugInfo/DWARF/DWARFContext.h no longer includes: - "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h" - "llvm/DebugInfo/DWARF/DWARFCompileUnit.h" - "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h" - "llvm/DebugInfo/DWARF/DWARFDebugAranges.h" - "llvm/DebugInfo/DWARF/DWARFDebugFrame.h" - "llvm/DebugInfo/DWARF/DWARFDebugLoc.h" - "llvm/DebugInfo/DWARF/DWARFDebugMacro.h" - "llvm/DebugInfo/DWARF/DWARFGdbIndex.h" - "llvm/DebugInfo/DWARF/DWARFSection.h" - "llvm/DebugInfo/DWARF/DWARFTypeUnit.h" - "llvm/DebugInfo/DWARF/DWARFUnitIndex.h" Plus llvm/Support/Errc.h not included by a bunch of llvm/DebugInfo/DWARF/DWARF*.h files Preprocessed lines to build llvm on my setup: after: 1065629059 before: 1066621848 Which is a great diff! Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D119723
2021-10-21[DebugInfo] Expand ability to load 2-byte addresses in dwarf sectionsJack Anderson
Some dwarf loaders in LLVM are hard-coded to only accept 4-byte and 8-byte address sizes. This patch generalizes acceptance into `DWARFContext::isAddressSizeSupported` and provides a common way to generate rejection errors. The MSP430 target has been given new tests to cover dwarf loading cases that previously failed due to 2-byte addresses. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D111953
2020-06-02[DebugInfo] Report the format of address tables [4/10]Igor Kudrin
Differential Revision: https://reviews.llvm.org/D80523
2020-03-04Use DWARFDataExtractor::getInitialLength in DWARFDebugAddrPavel Labath
Reviewers: ikudrin, jhenderson, probinson Subscribers: hiraditya, dblaikie, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75532
2020-02-12[DebugInfo] Add support for DWARF64 into DWARFDebugAddr.Igor Kudrin
Differential Revision: https://reviews.llvm.org/D74198
2020-02-12[DebugInfo] Simplify DWARFDebugAddr.Igor Kudrin
The patch removes unnecessary members of DWARFDebugAddr and further simplifies the implementation by separating parsing methods of tables in the DWARFv5 and pre-standard formats. Differential Revision: https://reviews.llvm.org/D74197
2020-02-12[DebugInfo] Refine error messages in DWARFDebugAddr.Igor Kudrin
As a preparation for the subsequent patches, this updates the wordings of some error messages in DWARFDebugAddr. Differential Revision: https://reviews.llvm.org/D74196
2020-02-12[DebugInfo] Use "an address table" in diagnostic messages of DWARFDebugAddr.Igor Kudrin
This replaces a collocation "a .debug_addr table" with "an address table" because the latter sounds more accurate. Differential Revision: https://reviews.llvm.org/D74407
2020-02-12[DebugInfo] Do not dump header field for pre-DWARFv5 address tables.Igor Kudrin
As there is no header in pre-DWARFv5 address tables, and we fill the class data members with some artificial values, we should not dump them as that might be misleading. Differential Revision: https://reviews.llvm.org/D74195
2020-02-12[DebugInfo] Fix reading addresses in DWARFDebugAddr.Igor Kudrin
As addresses in the address tables may have relocations, thus, the relocations should be resolved to read the correct address. That is especially important for targets that use RELA relocations because in that case addends are stored in relocation sections. Differential Revision: https://reviews.llvm.org/D74404
2020-02-08[DebugInfo] Allow reading an address table with a mismatched address.Igor Kudrin
This case does not look as an unrecoverable error. Differential Revision: https://reviews.llvm.org/D74194
2019-08-06Switch LLVM to use 64-bit offsets (2/5)Igor Kudrin
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
2019-07-24[DWARF][NFC] Add constants for reserved values of an initial length field.Igor Kudrin
Differential Revision: https://reviews.llvm.org/D65039 llvm-svn: 366887
2019-07-02[DWARF] Simplify dumping of a .debug_addr section.Igor Kudrin
This patch removes the part which tried to interpret addresses in that section as offsets and simplifies the remaining code. Differential Revision: https://reviews.llvm.org/D64020 llvm-svn: 364896
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
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
2018-11-12[DWARF] Do not use PRIx32 for printing uint64_t valuesSimon Atanasyan
The `DWARFDebugAddrTable::dump` routine prints 32/64-bits addresses. These values are stored in a vector of `uint64_t` independently of their original sizes. But `format` function gets format string with PRIx32 suffix in case of 32-bit address size. At least on MIPS 32-bit targets that leads to incorrect output. This patch changes formats strings and always use PRIx64 to print `uint64_t` values. Differential Revision: http://reviews.llvm.org/D54424 llvm-svn: 346715
2018-07-31[DWARF] Support for .debug_addr (consumer)Victor Leschuk
This patch implements basic support for parsing and dumping DWARFv5 .debug_addr section. llvm-svn: 338447