From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/4] [gdb/testsuite] Add missing type_offset in gdb.dwarf/debug-names-tu.exp
Date: Fri, 22 May 2026 16:37:36 +0200 [thread overview]
Message-ID: <20260522143737.3373000-4-tdevries@suse.de> (raw)
In-Reply-To: <20260522143737.3373000-1-tdevries@suse.de>
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.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34157
---
gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp | 6 ++++--
gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp b/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
index 10e649f06af..5d31414ba29 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
@@ -34,6 +34,8 @@ Dwarf::assemble {
global $var
}
+ declare_labels type_offset
+
cu { label cu_label } {
compile_unit {
DW_AT_language @DW_LANG_C
@@ -47,11 +49,11 @@ Dwarf::assemble {
}
}
- 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
} {
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl b/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl
index af3f263a273..bd48df6a894 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl
@@ -39,6 +39,8 @@ Dwarf::assemble {
global $var
}
+ declare_labels type_label
+
cu { label cu_label version $dwarf_version } {
compile_unit {
DW_AT_language @DW_LANG_C
@@ -52,13 +54,13 @@ Dwarf::assemble {
}
}
- 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
} {
--
2.51.0
next prev parent reply other threads:[~2026-05-22 14:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 14:37 [PATCH 0/4] [gdb/testsuite] Fix some more dwarf assembly test-cases Tom de Vries
2026-05-22 14:37 ` [PATCH 1/4] [gdb/testsuite] Remove invalid .debug_line section in gdb.dwarf2/dw2-icycle.exp Tom de Vries
2026-05-22 14:55 ` Tom Tromey
2026-05-22 14:37 ` [PATCH 2/4] [gdb/testsuite] Complete 64-bit port of gdb.dwarf2/dw2-skip-prologue.exp Tom de Vries
2026-05-22 15:07 ` Tom Tromey
2026-05-22 14:37 ` Tom de Vries [this message]
2026-05-22 15:03 ` [PATCH 3/4] [gdb/testsuite] Add missing type_offset in gdb.dwarf/debug-names-tu.exp Tom Tromey
2026-05-23 8:15 ` Tom de Vries
2026-05-22 14:37 ` [PATCH 4/4] [gdb/testsuite] Improve dwarf assembly for implicit const in .debug_names Tom de Vries
2026-05-22 14:54 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260522143737.3373000-4-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox