[llvm] Add support for verifying local type units in .debug_names. (PR #101133)
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 15:48:32 PDT 2024
================
@@ -0,0 +1,116 @@
+# RUN: yaml2obj %s -o - | not llvm-dwarfdump -verify - | FileCheck %s
----------------
clayborg wrote:
This is a linked executable. It doesn't work on .o files with multiple DWARF units. I tried to make one and ended up with:
```
Verifying /Users/gclayton/Documents/src/github/Debug/test/tools/llvm-dwarfdump/X86/Output/debug-names-verify-tu-bad-die.s.tmp: file format elf64-x86-64
Verifying .debug_abbrev...
Verifying .debug_info Unit Header Chain...
Verifying .debug_types Unit Header Chain...
Verifying non-dwo Units...
Verifying unit: 1 / 2
Verifying unit: 2 / 2, "main.cpp"
Verifying dwo Units...
Verifying .debug_line...
warning: .debug_line[0x00000000].prologue.file_names[1] is a duplicate of file_names[0]
Verifying .debug_str_offsets...
Verifying .debug_names...
error: Name Index @ 0x0: Entry @ 0x86: mismatched Tag of DIE @ 0x23: index - DW_TAG_subprogram; debug_info - DW_TAG_structure_type.
error: Name Index @ 0x0: Entry @ 0x86: mismatched Name of DIE @ 0x23: index - main; debug_info - Foo.
error: Aggregated error counts:
error: Name Index contains mismatched Tag of DIE occurred 1 time(s).
error: Name Index contains mismatched name of DIE occurred 1 time(s).
Errors detected.
```
https://github.com/llvm/llvm-project/pull/101133
More information about the llvm-commits
mailing list