History log of /llvm-project-15.0.7/llvm/lib/DWARFLinker/DWARFLinker.cpp (Results 1 – 25 of 72)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# 0d191b75 25-Jul-2022 Alexey Lapshin <[email protected]>

[Debuginfo][llvm-dwarfutil] Add check for unsupported debug sections.

Current DWARFLinker implementation does not support some debug sections
(mainly DWARF v5 sections). This patch adds diagnostic f

[Debuginfo][llvm-dwarfutil] Add check for unsupported debug sections.

Current DWARFLinker implementation does not support some debug sections
(mainly DWARF v5 sections). This patch adds diagnostic for such sections.
The warning would be displayed for critical(such that could not be removed)
sections and the source file would be skipped. Other unsupported sections
would be removed and warning message should be displayed. The zero exit
status would be returned for both cases.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D123623

show more ...


# 8bb4451a 19-Jul-2022 Alexey Lapshin <[email protected]>

[Reland][DebugInfo][llvm-dwarfutil] Combine overlapped address ranges.

DWARF files may contain overlapping address ranges. f.e. it can happen if the two
copies of the function have identical instruc

[Reland][DebugInfo][llvm-dwarfutil] Combine overlapped address ranges.

DWARF files may contain overlapping address ranges. f.e. it can happen if the two
copies of the function have identical instruction sequences and they end up sharing.
That looks incorrect from the point of view of DWARF spec. Current implementation
of DWARFLinker does not combine overlapped address ranges. It would be good if such
ranges would be handled in some useful way. Thus, this patch allows DWARFLinker
to combine overlapped ranges in a single one.

Depends on D86539

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D123469

show more ...


# 3aad4908 21-Jul-2022 Alexey Lapshin <[email protected]>

Revert "[DebugInfo][llvm-dwarfutil] Combine overlapped address ranges."

This reverts commit d2a4d6bf9c52861f3d418bf7bb7d05f6e74dfead.


# d2a4d6bf 19-Jul-2022 Alexey Lapshin <[email protected]>

[DebugInfo][llvm-dwarfutil] Combine overlapped address ranges.

DWARF files may contain overlapping address ranges. f.e. it can happen if the two
copies of the function have identical instruction seq

[DebugInfo][llvm-dwarfutil] Combine overlapped address ranges.

DWARF files may contain overlapping address ranges. f.e. it can happen if the two
copies of the function have identical instruction sequences and they end up sharing.
That looks incorrect from the point of view of DWARF spec. Current implementation
of DWARFLinker does not combine overlapped address ranges. It would be good if such
ranges would be handled in some useful way. Thus, this patch allows DWARFLinker
to combine overlapped ranges in a single one.

Depends on D86539

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D123469

show more ...


# 4539b441 10-Jul-2022 Alexey Lapshin <[email protected]>

[Reland][Debuginfo][llvm-dwarfutil] llvm-dwarfutil dsymutil-like tool for ELF.

This patch implements proposal https://lists.llvm.org/pipermail/llvm-dev/2020-August/144579.html
llvm-dwarfutil - is a

[Reland][Debuginfo][llvm-dwarfutil] llvm-dwarfutil dsymutil-like tool for ELF.

This patch implements proposal https://lists.llvm.org/pipermail/llvm-dev/2020-August/144579.html
llvm-dwarfutil - is a tool that is used for processing debug info(DWARF) located in built binary files to improve debug info quality, reduce debug info size. The patch currently implements smaller set of command-line options(comparing to the proposal):

```
./llvm-dwarfutil [options] <input file> <output file>

--garbage-collection Do garbage collection for debug info(default)
-j <value> Alias for --num-threads
--no-garbage-collection Don`t do garbage collection for debug info
--no-odr-deduplication Don`t do ODR deduplication for debug types
--no-odr Alias for --no-odr-deduplication
--no-separate-debug-file
Create single output file, containing debug tables(default)
--num-threads <threads> Number of available threads for multi-threaded execution. Defaults to the number of cores on the current machine
--odr-deduplication Do ODR deduplication for debug types(default)
--odr Alias for --odr-deduplication
--separate-debug-file Create two output files: file w/o debug tables and file with debug tables
--tombstone [bfd,maxpc,exec,universal]
Tombstone value used as a marker of invalid address(default: universal)
=bfd - Zero for all addresses and [1,1] for DWARF v4 (or less) address ranges and exec
=maxpc - Minus 1 for all addresses and minus 2 for DWARF v4 (or less) address ranges
=exec - Match with address ranges of executable sections
=universal - Both: bfd and maxpc
```

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D86539

show more ...


# e717f91c 19-Jul-2022 Alexey Lapshin <[email protected]>

Revert "[Debuginfo][llvm-dwarfutil] llvm-dwarfutil dsymutil-like tool for ELF."

This reverts commit e2147c26bd1522ad67a98836fbe94933eab869bb.


# e2147c26 10-Jul-2022 Alexey Lapshin <[email protected]>

[Debuginfo][llvm-dwarfutil] llvm-dwarfutil dsymutil-like tool for ELF.

This patch implements proposal https://lists.llvm.org/pipermail/llvm-dev/2020-August/144579.html
llvm-dwarfutil - is a tool tha

[Debuginfo][llvm-dwarfutil] llvm-dwarfutil dsymutil-like tool for ELF.

This patch implements proposal https://lists.llvm.org/pipermail/llvm-dev/2020-August/144579.html
llvm-dwarfutil - is a tool that is used for processing debug info(DWARF) located in built binary files to improve debug info quality, reduce debug info size. The patch currently implements smaller set of command-line options(comparing to the proposal):

```
./llvm-dwarfutil [options] <input file> <output file>

--garbage-collection Do garbage collection for debug info(default)
-j <value> Alias for --num-threads
--no-garbage-collection Don`t do garbage collection for debug info
--no-odr-deduplication Don`t do ODR deduplication for debug types
--no-odr Alias for --no-odr-deduplication
--no-separate-debug-file
Create single output file, containing debug tables(default)
--num-threads <threads> Number of available threads for multi-threaded execution. Defaults to the number of cores on the current machine
--odr-deduplication Do ODR deduplication for debug types(default)
--odr Alias for --odr-deduplication
--separate-debug-file Create two output files: file w/o debug tables and file with debug tables
--tombstone [bfd,maxpc,exec,universal]
Tombstone value used as a marker of invalid address(default: universal)
=bfd - Zero for all addresses and [1,1] for DWARF v4 (or less) address ranges and exec
=maxpc - Minus 1 for all addresses and minus 2 for DWARF v4 (or less) address ranges
=exec - Match with address ranges of executable sections
=universal - Both: bfd and maxpc
```

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D86539

show more ...


# a17c90da 12-Jul-2022 Jonas Devlieghere <[email protected]>

Re-land "[dsymutil] Account for DW_OP_convert being CU relative"

Currently, dsymutil treats the DW_OP_convert operand as absolute instead
of CU relative, as described by in the DWARFv5 spec, 2.5.1.6

Re-land "[dsymutil] Account for DW_OP_convert being CU relative"

Currently, dsymutil treats the DW_OP_convert operand as absolute instead
of CU relative, as described by in the DWARFv5 spec, 2.5.1.6:

"[DW_OP_convert] takes one operand, which is an unsigned LEB128 integer
that represents the offset of a debugging information entry in the current
compilation unit"

This patch makes dsymutil correctly treat the offset as CU relative,
preventing a crash when there are multiple compilation units.

Big thanks to Akira Hatanaka for figuring out this issue and providing
both a reduced test case and a proposed fix.

show more ...


# b93119aa 12-Jul-2022 Nico Weber <[email protected]>

Revert "[dsymutil] Account for DW_OP_convert being CU relative"

This reverts commit 7f3000fa8b321f7fae169a615734de74a737b5d4.
Breaks tests on Windows, see commits on https://reviews.llvm.org/rG7f300

Revert "[dsymutil] Account for DW_OP_convert being CU relative"

This reverts commit 7f3000fa8b321f7fae169a615734de74a737b5d4.
Breaks tests on Windows, see commits on https://reviews.llvm.org/rG7f3000fa

show more ...


# 7f3000fa 12-Jul-2022 Jonas Devlieghere <[email protected]>

[dsymutil] Account for DW_OP_convert being CU relative

Currently, dsymutil treats the DW_OP_convert operand as absolute instead
of CU relative, as described by in the DWARFv5 spec, 2.5.1.6:

"[DW_

[dsymutil] Account for DW_OP_convert being CU relative

Currently, dsymutil treats the DW_OP_convert operand as absolute instead
of CU relative, as described by in the DWARFv5 spec, 2.5.1.6:

"[DW_OP_convert] takes one operand, which is an unsigned LEB128 integer
that represents the offset of a debugging information entry in the current
compilation unit"

This patch makes dsymutil correctly treat the offset as CU relative,
preventing a crash when there are multiple compilation units.

Big thanks to Akira Hatanaka for figuring out this issue and providing
both a reduced test case and a proposed fix.

show more ...


# 2b747241 27-Jun-2022 Alexey Lapshin <[email protected]>

[DWARFLinker] mark odr candidates inside the same object file.

This patch is extracted from D86539.

Current implementation of lookForDIEsToKeep() function skips types
duplications basing on the get

[DWARFLinker] mark odr candidates inside the same object file.

This patch is extracted from D86539.

Current implementation of lookForDIEsToKeep() function skips types
duplications basing on the getCanonicalDIEOffset() data:

```
if (AttrSpec.Form != dwarf::DW_FORM_ref_addr && (UseOdr || IsModuleRef) &&
Info.Ctxt &&
Info.Ctxt != ReferencedCU->getInfo(Info.ParentIdx).Ctxt &&
Info.Ctxt->getCanonicalDIEOffset() && isODRAttribute(AttrSpec.Attr)) <<<<<
continue;
```

But that field is set after all compile units inside object file are processed:

```
for (auto &CurrentUnit : OptContext.CompileUnits)
lookForDIEsToKeep(.., &CurrentUnit, ..); // check CanonicalDIEOffset

DIECloner.cloneAllCompileUnits(); // set CanonicalDIEOffset
```

Thus, if the object file contains several compilation units - types would
not be deduplicated. The above solution works well for the case when the object file
contains only one compilation unit. But if the object file contains several compilation
units then types would not be deduplicated between these compilation units.

This patch changes the algorithm so that types were deduplicated between
compilation units from the same object file.

It produces binary incompatible output for the cases when several compilation units
are located inside the same object file.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D125469

show more ...


Revision tags: llvmorg-14.0.6
# 5413bf1b 20-Jun-2022 Kazu Hirata <[email protected]>

Don't use Optional::hasValue (NFC)


# 129b531c 19-Jun-2022 Kazu Hirata <[email protected]>

[llvm] Use value_or instead of getValueOr (NFC)


Revision tags: llvmorg-14.0.5, llvmorg-14.0.4
# 4d9c0834 12-May-2022 Alexey Lapshin <[email protected]>

[DWARFLinker][NFC] Add None value to the DwarfLinkerAccelTableKind enum.

this review is extracted from D86539.

1. Rename AccelTableKind to DwarfLinkerAccelTableKind
(to differentiate from AccelT

[DWARFLinker][NFC] Add None value to the DwarfLinkerAccelTableKind enum.

this review is extracted from D86539.

1. Rename AccelTableKind to DwarfLinkerAccelTableKind
(to differentiate from AccelTableKind from CodeGen/AsmPrinter/DwarfDebug.h)

2. Add None value to the DwarfLinkerAccelTableKind.

3. added 'None' value for 'accelerator' option of dsymutil.

Differential Revision: https://reviews.llvm.org/D125474

show more ...


# fdae8641 12-May-2022 Alexey Lapshin <[email protected]>

[DWARFLinker][NFC] cleanup AddressManager interface.

this review is extracted from D86539

1. delete areRelocationsResolved() method.
2. rename hasLiveMemoryLocation() -> isLiveVariable()

[DWARFLinker][NFC] cleanup AddressManager interface.

this review is extracted from D86539

1. delete areRelocationsResolved() method.
2. rename hasLiveMemoryLocation() -> isLiveVariable()
hasLiveAddressRange() -> isLiveSubprogram().

Differential Revision: https://reviews.llvm.org/D125492

show more ...


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3
# ed98c1b3 09-Mar-2022 serge-sans-paille <[email protected]>

Cleanup includes: DebugInfo & CodeGen

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D121332


Revision tags: llvmorg-14.0.0-rc2
# 409c515f 14-Feb-2022 Jonas Devlieghere <[email protected]>

[dsymutil] Add the ability to run the DWARF verifier on the input

Currently you can run the DWARF verifier on the linked dsymutil output.
This patch extends this functionality and makes it possible

[dsymutil] Add the ability to run the DWARF verifier on the input

Currently you can run the DWARF verifier on the linked dsymutil output.
This patch extends this functionality and makes it possible to
run the DWARF verifier on the input as well.

A new option --verify-dwarf allows you to specify input, output, all and
none. The existing --verify flag remains unchanged and acts and alias
for --verify-dwarf=output.

Input verification issues do not result in a non-zero exit code because
dsymutil is capable of taking invalid DWARF as input and producing valid
DWARF as output.

Differential revision: https://reviews.llvm.org/D89216

show more ...


Revision tags: llvmorg-14.0.0-rc1
# 3a3cb929 07-Feb-2022 Kazu Hirata <[email protected]>

[llvm] Use = default (NFC)


Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# 2aed0813 07-Jan-2022 Kazu Hirata <[email protected]>

[llvm] Use true/false instead of 1/0 (NFC)

Identified with modernize-use-bool-literals.


# 34435fd1 05-Jan-2022 Luís Ferreira <[email protected]>

[llvm] Add support for DW_TAG_immutable_type

Added documentation about DW_TAG_immutable_type too.

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D113633


# 3782624c 02-Jan-2022 Kazu Hirata <[email protected]>

[DebugInfo] Remove hasInterestingContent (NFC)

hasInterestingContent was introduced without a use on Sep 15, 2015 in
commit e5162dba49890d9d436ea99d003c792897c9b880.


# 71e5488a 14-Dec-2021 David Blaikie <[email protected]>

DebugInfo: Migrate callers from getAsCString to dwarf::toString

This makes a bunch of these call sites independent of a follow-up change
I'm making to have getAsCString return Expected<const char*>

DebugInfo: Migrate callers from getAsCString to dwarf::toString

This makes a bunch of these call sites independent of a follow-up change
I'm making to have getAsCString return Expected<const char*> for more
descriptive error messages so that the failures there can be
communicated up to DWARFVerifier (or other callers who want to provide
more verbose diagnostics) so DWARFVerifier doesn't have to re-implement
the string lookup logic and error checking.

show more ...


# 0005efd4 14-Dec-2021 Ellis Hoag <[email protected]>

[DebugInfo][dsymutil] Keep locations for function-local globals

In debug info, we expect variables to have location info if they are used and we don't want location info for functions that are not u

[DebugInfo][dsymutil] Keep locations for function-local globals

In debug info, we expect variables to have location info if they are used and we don't want location info for functions that are not used. However, if an unused function is inlined, we could have the scenario where a function is not in the final binary but its static variable is in the final binary. Ensure that variables in the final binary have location debug info even if their scope was inlined.

Also add `--implicit-check-not` to a test for clarity.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D115565

show more ...


# 630c847b 07-Dec-2021 Kazu Hirata <[email protected]>

[llvm] Use range-based for loops (NFC)


Revision tags: llvmorg-13.0.1-rc1
# 62d6ff5e 24-Sep-2021 Jonas Devlieghere <[email protected]>

[dsymutil] Track incompleteness across unions

When determining the incompleteness of a DIE based on its children, make
sure we propagate it across union types. See test case for an example.
Without

[dsymutil] Track incompleteness across unions

When determining the incompleteness of a DIE based on its children, make
sure we propagate it across union types. See test case for an example.
Without this patch we never emit the definition of Container_ivars.

Differential revision: https://reviews.llvm.org/D110443

show more ...


123