Commit Graph

15 Commits

Author SHA1 Message Date
Igor Kudrin
ab91d37b40 [DebugInfo] Report the format of address tables [4/10]
Differential Revision: https://reviews.llvm.org/D80523
2020-06-02 17:55:30 +07:00
Pavel Labath
34adeccc0f Use DWARFDataExtractor::getInitialLength in DWARFDebugAddr
Reviewers: ikudrin, jhenderson, probinson

Subscribers: hiraditya, dblaikie, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75532
2020-03-04 13:00:15 +01:00
Igor Kudrin
c206b32aa7 [DebugInfo] Add support for DWARF64 into DWARFDebugAddr.
Differential Revision: https://reviews.llvm.org/D74198
2020-02-12 13:33:01 +07:00
Igor Kudrin
98bbb1f23e [DebugInfo] Simplify DWARFDebugAddr.
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 13:33:00 +07:00
Igor Kudrin
70f13e0c61 [DebugInfo] Refine error messages in DWARFDebugAddr.
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 13:33:00 +07:00
Igor Kudrin
5c5156a6a9 [DebugInfo] Use "an address table" in diagnostic messages of DWARFDebugAddr.
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 13:33:00 +07:00
Igor Kudrin
80d0555a9c [DebugInfo] Do not dump header field for pre-DWARFv5 address tables.
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 13:33:00 +07:00
Igor Kudrin
aba0bf1de0 [DebugInfo] Fix reading addresses in DWARFDebugAddr.
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-12 13:32:59 +07:00
Igor Kudrin
17419b129b [DebugInfo] Allow reading an address table with a mismatched address.
This case does not look as an unrecoverable error.

Differential Revision: https://reviews.llvm.org/D74194
2020-02-08 20:00:03 +07:00
Igor Kudrin
2f7af9b01c Switch LLVM to use 64-bit offsets (2/5)
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-08-06 10:49:40 +00:00
Igor Kudrin
1b01df0e0a [DWARF][NFC] Add constants for reserved values of an initial length field.
Differential Revision: https://reviews.llvm.org/D65039

llvm-svn: 366887
2019-07-24 11:34:29 +00:00
Igor Kudrin
a8593263e5 [DWARF] Simplify dumping of a .debug_addr section.
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-07-02 09:57:28 +00:00
Chandler Carruth
ae65e281f3 Update the file headers across all of the LLVM projects in the monorepo
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
2019-01-19 08:50:56 +00:00
Simon Atanasyan
b3c398ca15 [DWARF] Do not use PRIx32 for printing uint64_t values
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-11-12 22:43:17 +00:00
Victor Leschuk
83ecc100c7 [DWARF] Support for .debug_addr (consumer)
This patch implements basic support for parsing
  and dumping DWARFv5 .debug_addr section.

llvm-svn: 338447
2018-07-31 22:19:19 +00:00