With llvm-dwarfdump we run into this warning:
...
$ llvm-dwarfdump -a -v debug-names-tu > /dev/null
warning: DWARF type unit at offset 0x00000028 has its relocated type_offset \
0x00000028 pointing inside the header
...
Fix this by adding the missing type_offset.
Likewise in gdb.dwarf2/debug-names-bad-cu-index.exp.
Approved-By: Tom Tromey <tom@tromey.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34157
global $var
}
+ declare_labels type_offset
+
cu { label cu_label } {
compile_unit {
DW_AT_language @DW_LANG_C
}
}
- tu { label tu_label } 0x8ece66f4224fddb3 "" {
+ tu { label tu_label } 0x8ece66f4224fddb3 type_offset {
type_unit {} {
declare_labels int_type
- structure_type {
+ type_offset: structure_type {
DW_AT_name struct_with_int_member
DW_AT_byte_size 4 sdata
} {
global $var
}
+ declare_labels type_label
+
cu { label cu_label version $dwarf_version } {
compile_unit {
DW_AT_language @DW_LANG_C
}
}
- tu { label tu_label version $dwarf_version } 0x8ece66f4224fddb3 "" {
+ tu { label tu_label version $dwarf_version } 0x8ece66f4224fddb3 type_label {
type_unit {
DW_AT_language @DW_LANG_C
} {
declare_labels int_type
- structure_type {
+ type_label: structure_type {
DW_AT_name struct_with_int_member
DW_AT_byte_size 4 sdata
} {