|
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 |
|
| #
84960896 |
| 08-Jul-2022 |
David Blaikie <[email protected]> |
Remove unnecessary braces
|
| #
ac6df7fc |
| 08-Jul-2022 |
Pedro Alves <[email protected]> |
llvm-dwarfdump: Don't crash if DW_AT_{decl,call}_{file,line} uses signed form
The DWARF spec says:
Any debugging information entry representing the declaration of an object, module, subprogram or
llvm-dwarfdump: Don't crash if DW_AT_{decl,call}_{file,line} uses signed form
The DWARF spec says:
Any debugging information entry representing the declaration of an object, module, subprogram or type may have DW_AT_decl_file, DW_AT_decl_line and DW_AT_decl_column attributes, each of whose value is an unsigned integer ^^^^^^^^ constant.
If however, a producer happens to emit DW_AT_decl_file / DW_AT_decl_line using a signed integer form, llvm-dwarfdump crashes, like so:
(... snip ...) 0x000000b4: DW_TAG_structure_type DW_AT_name ("test_struct") DW_AT_byte_size (136) DW_AT_decl_file (llvm-dwarfdump: (... snip ...)/llvm/include/llvm/ADT/Optional.h:197: T& llvm::optional_detail::OptionalStorage<T, true>::getValue() & [with T = long unsigned int]: Assertion `hasVal' failed. PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: /opt/rocm/llvm/bin/llvm-dwarfdump ./testsuite/outputs/gdb.rocm/lane-pc-vega20/lane-pc-vega20-kernel.so #0 0x000055cc8e78315f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0 #1 0x000055cc8e780d3d SignalHandler(int) Signals.cpp:0:0 #2 0x00007f8f2cae8420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420) #3 0x00007f8f2c58d00b raise /build/glibc-SzIz7B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1 #4 0x00007f8f2c56c859 abort /build/glibc-SzIz7B/glibc-2.31/stdlib/abort.c:81:7 #5 0x00007f8f2c56c729 get_sysdep_segment_value /build/glibc-SzIz7B/glibc-2.31/intl/loadmsgcat.c:509:8 #6 0x00007f8f2c56c729 _nl_load_domain /build/glibc-SzIz7B/glibc-2.31/intl/loadmsgcat.c:970:34 #7 0x00007f8f2c57dfd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6) #8 0x000055cc8e58ceb9 llvm::DWARFDie::dump(llvm::raw_ostream&, unsigned int, llvm::DIDumpOptions) const (/opt/rocm/llvm/bin/llvm-dwarfdump+0x2e0eb9) #9 0x000055cc8e58bec3 llvm::DWARFDie::dump(llvm::raw_ostream&, unsigned int, llvm::DIDumpOptions) const (/opt/rocm/llvm/bin/llvm-dwarfdump+0x2dfec3) #10 0x000055cc8e5b28a3 llvm::DWARFCompileUnit::dump(llvm::raw_ostream&, llvm::DIDumpOptions) (.part.21) DWARFCompileUnit.cpp:0:0
Likewise with DW_AT_call_file / DW_AT_call_line.
The problem is that the code in llvm/lib/DebugInfo/DWARF/DWARFDie.cpp dumping these attributes assumes that FormValue.getAsUnsignedConstant() returns an armed optional. If in debug mode, we get an assertion line the above. If in release mode, and asserts are compiled out, then we proceed as if the optional had a value, running into undefined behavior, printing whatever random value.
Fix this by checking whether the optional returned by FormValue.getAsUnsignedConstant() has a value, like done in other places.
In addition, DWARFVerifier.cpp is validating DW_AT_call_file / DW_AT_decl_file, but not AT_call_line / DW_AT_decl_line. This commit fixes that too.
The llvm-dwarfdump/X86/verify_file_encoding.yaml testcase is extended to cover these cases. Current llvm-dwarfdump crashes running the newly-extended test.
"make check-llvm-tools-llvm-dwarfdump" shows no regressions, on x86-64 GNU/Linux.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D129392
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
27fd01d3 |
| 22-Jun-2022 |
serge-sans-paille <[email protected]> |
[iwyu] Handle regressions in libLLVM header include
Running iwyu-diff on LLVM codebase since fb67d683db46dfd88da09d99 detected a few regressions, fixing them.
The impact on preprocessed output is n
[iwyu] Handle regressions in libLLVM header include
Running iwyu-diff on LLVM codebase since fb67d683db46dfd88da09d99 detected a few regressions, fixing them.
The impact on preprocessed output is negligible: -4k lines.
show more ...
|
| #
7a47ee51 |
| 21-Jun-2022 |
Kazu Hirata <[email protected]> |
[llvm] Don't use Optional::getValue (NFC)
|
| #
129b531c |
| 19-Jun-2022 |
Kazu Hirata <[email protected]> |
[llvm] Use value_or instead of getValueOr (NFC)
|
| #
c20381b2 |
| 18-Jun-2022 |
Felipe de Azevedo Piovezan <[email protected]> |
llvm-dwarf-dump: include type name for AT_containing_type
Type attributes are currently printed as: DW_AT_type (<address> "<name>") For example: DW_AT_type (0x00000086 "double")
However,
llvm-dwarf-dump: include type name for AT_containing_type
Type attributes are currently printed as: DW_AT_type (<address> "<name>") For example: DW_AT_type (0x00000086 "double")
However, containing_type attributes omit the name, for example: DW_AT_containing_type (0x00000086)
In order to make the dwarf dumps easier to read, and to have consistency between the type-like attributes, this commit changes the way DW_AT_containing_type is printed so that it includes the name of the type it refers to: DW_AT_containing_type (0x00000086 "double")
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D127078
show more ...
|
| #
61fac2c3 |
| 15-Jun-2022 |
David Blaikie <[email protected]> |
Incomplete attempt to pull DWARFTypePrinter into its own file for reuse from lldb
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4 |
|
| #
cead4ece |
| 23-May-2022 |
Mitch Phillips <[email protected]> |
[symbolizer] Parse DW_TAG_variable DIs to show line info for globals
Currently, llvm-symbolizer doesn't like to parse .debug_info in order to show the line info for global variables. addr2line does
[symbolizer] Parse DW_TAG_variable DIs to show line info for globals
Currently, llvm-symbolizer doesn't like to parse .debug_info in order to show the line info for global variables. addr2line does this. In the future, I'm looking to migrate AddressSanitizer off of internal metadata over to using debuginfo, and this is predicated on being able to get the line info for global variables.
This patch adds the requisite support for getting the line info from the .debug_info section for symbolizing global variables. This only happens when you ask for a global variable to be symbolized as data.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D123538
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
6b306233 |
| 06-Apr-2022 |
David Blaikie <[email protected]> |
DebugInfo: Make the simplified template names prefix more unique
|
| #
bb3980ae |
| 05-Apr-2022 |
David Blaikie <[email protected]> |
DebugInfo: Don't use enumerators in template names for debug info as they are not canonical
Since enumerators may not be available in every translation unit they can't be reliably used to name entit
DebugInfo: Don't use enumerators in template names for debug info as they are not canonical
Since enumerators may not be available in every translation unit they can't be reliably used to name entities. (this also makes simplified template name roundtripping infeasible - since the expected name could only be rebuilt if the enumeration definition could be found (or only if it couldn't be found, depending on the context of the original name))
show more ...
|
| #
4841dab4 |
| 21-Mar-2022 |
David Blaikie <[email protected]> |
llvm-dwarfdump: Including calling convention attribute in pretty printed type names
|
| #
a3095a25 |
| 17-Mar-2022 |
David Blaikie <[email protected]> |
DebugInfo: Simplify const/volatile printing for function types
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
d7c4f7f1 |
| 16-Feb-2022 |
David Blaikie <[email protected]> |
DebugInfo: fix a couple of spurious spaces in simplified template name rebuilding
|
| #
290e4823 |
| 14-Feb-2022 |
serge-sans-paille <[email protected]> |
Cleanup LLVMDWARFDebugInfo
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/DW
Cleanup LLVMDWARFDebugInfo
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
show more ...
|
| #
e72c195f |
| 10-Feb-2022 |
serge-sans-paille <[email protected]> |
Cleanup LLVMObject headers
Most notably,
llvm/Object/Binary.h no longer includes llvm/Support/MemoryBuffer.h llvm/Object/MachOUniversal*.h no longer include llvm/Object/Archive.h llvm/Object/TapiUn
Cleanup LLVMObject headers
Most notably,
llvm/Object/Binary.h no longer includes llvm/Support/MemoryBuffer.h llvm/Object/MachOUniversal*.h no longer include llvm/Object/Archive.h llvm/Object/TapiUniversal.h no longer includes llvm/Object/TapiFile.h
llvm-project preprocessed size: before: 1068185081 after: 1068324320
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D119457
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
713c2b47 |
| 12-Jan-2022 |
Alexey Lapshin <[email protected]> |
[DebugInfo][DWARF][NFC] Refactor DWARFTypePrinter usages. Create functions to print type dies.
This patch creates functions which might be used to dump types. This functionality was already implemen
[DebugInfo][DWARF][NFC] Refactor DWARFTypePrinter usages. Create functions to print type dies.
This patch creates functions which might be used to dump types. This functionality was already implemented by DWARFTypePrinter. Now it could be reused. It will help D96035, which uses DWARFTypePrinter.
Differential Revision: https://reviews.llvm.org/D117134
show more ...
|
| #
06c15460 |
| 05-Jan-2022 |
David Blaikie <[email protected]> |
DebugInfo: Rebuild varargs function types correctly
Improves llvm-dwarfdump output and for simplified template names roundtripping.
|
| #
6edc3893 |
| 29-Dec-2021 |
David Blaikie <[email protected]> |
DWARFDie: don't try to compute a full template name for a template parameter packs
Otherwise these look a lot like actual templates (they have a name and they have template parameters) but they don'
DWARFDie: don't try to compute a full template name for a template parameter packs
Otherwise these look a lot like actual templates (they have a name and they have template parameters) but they don't participate in naming (this doesn't come up in practice because a template parameter pack DIE is never referenced from another DIE (so we don't do full name rebuilding for it) or the subject of simplified template name rebuilding (never has the _STN prefix)) - it could be tested with some hand crafted DWARF but doesn't seem important/useful to do so.
This change is just for performance - to avoid trying to parse more DIEs, etc, when it's not needed when computing the name in the DWARF verifier.
show more ...
|
| #
f24dff35 |
| 29-Dec-2021 |
David Blaikie <[email protected]> |
DWARFVerifier: Delay loading nested types in type dumping to improve performance
Avoid trying to resolve nested types that may not be needed because the name is already provided by the outer DIE.
|
| #
2d303e67 |
| 25-Dec-2021 |
Kazu Hirata <[email protected]> |
Remove redundant return and continue statements (NFC)
Identified with readability-redundant-control-flow.
|
| #
0bf2c877 |
| 03-Dec-2021 |
Kristina Bessonova <[email protected]> |
[llvm-dwarfdump] Do not print preceding :: for local types
Reviewed By: dblaikie, jhenderson
Differential Revision: https://reviews.llvm.org/D114892
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
3cbc4c48 |
| 18-Nov-2021 |
David Blaikie <[email protected]> |
llvm-dwarfdump: Rebuild type names in dwo type units
|
| #
58b1b641 |
| 10-Nov-2021 |
David Blaikie <[email protected]> |
llvm-dwarfdump: Lookup type units when prettyprinting types
This handles DWARFv4 and DWARFv5 type units, but not Split DWARF type units. That'll come in a follow-up patch.
|
| #
24e07e1c |
| 09-Nov-2021 |
David Blaikie <[email protected]> |
DebugInfoDWARF: Refactor/simplify a couple of minor things
|
| #
c8ae0898 |
| 08-Nov-2021 |
Alexey Lapshin <[email protected]> |
[llvm-dwarfdump] dump link to the immediate parent.
It is often useful to know which die is the parent of the current die. This patch adds information about parent offset into the dump:
0x0000000b:
[llvm-dwarfdump] dump link to the immediate parent.
It is often useful to know which die is the parent of the current die. This patch adds information about parent offset into the dump:
0x0000000b: DW_TAG_compile_unit DW_AT_producer ("by_hand")
0x00000014: DW_TAG_base_type (0x0000000b) <<<<<<<<<<<<<< DW_AT_name ("int")
Now it is easy to see which die is the parent of the current die. This patch makes that behaviour to be default. We can make it to be opt-in if neccessary.
This functionality differs from already existed "--show-parents" in that sence that parent information is shown for all dies and only link to the immediate parent is shown.
Differential Revision: https://reviews.llvm.org/D113406
show more ...
|