]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Don't generate dummy CUs in dwz files
authorTom de Vries <tdevries@suse.de>
Thu, 21 May 2026 15:19:27 +0000 (17:19 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 21 May 2026 15:19:27 +0000 (17:19 +0200)
I came across .debug_aranges sections in .dwz files.  Fix this by skipping
dummy CU generation in .dwz files.

Approved-By: Tom Tromey <tom@tromey.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34157

gdb/testsuite/gdb.dwarf2/dwzbuildid.tcl
gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp

index 45a80bd7ce45b3062309a0043a5cda3429b83116..84e0c9f76693498f3be536d716a4dc423065e9ef 100644 (file)
@@ -65,7 +65,7 @@ proc write_just_debugaltlink {filename dwzname buildid} {
 proc write_dwarf_file {filename buildid {value 99}} {
     set asm_file [standard_output_file $filename]
 
-    Dwarf::assemble $asm_file {
+    Dwarf::assemble [list filename $asm_file add_dummy_cus 0] {
        declare_labels int_label int_label2
 
        upvar buildid buildid
index 28a2fd7ad58cd623db81f11fe15564251dc752bd..5c9f27149afede2af4bd8bdb226b75c03affa719 100644 (file)
@@ -26,7 +26,7 @@ set build_id [string repeat ff 20]
 
 # Make some DWARF for the dwz file.
 set asm_file [standard_output_file $srcfile2]
-Dwarf::assemble $asm_file {
+Dwarf::assemble [list filename $asm_file add_dummy_cus 0] {
     build_id $::build_id
 
     tu {} 0x0000000000000001 the_type_i {