+2021-02-01 Tom de Vries <tdevries@suse.de>
+
+ * gdb.dwarf2/fission-base.S: Pass -DDWO=$dwo.
+ * gdb.dwarf2/fission-loclists-pie.S: Same.
+ * gdb.dwarf2/fission-loclists.S: Same.
+ * gdb.dwarf2/fission-multi-cu.S: Same.
+ * gdb.dwarf2/fission-reread.S: Same.
+ * gdb.dwarf2/fission-base.exp: Use DWO.
+ * gdb.dwarf2/fission-loclists-pie.exp: Same.
+ * gdb.dwarf2/fission-loclists.exp: Same.
+ * gdb.dwarf2/fission-multi-cu.exp: Same.
+ * gdb.dwarf2/fission-reread.exp: Same.
+
2021-01-29 Tom de Vries <tdevries@suse.de>
PR breakpoints/26063
and then massaging the output.
*/
+#define XSTR(s) STR(s)
+#define STR(s) #s
+
.file "fission-base.c"
.text
.8byte .Letext0-.Ltext0 # DW_AT_high_pc
.4byte .Ldebug_line0 # DW_AT_stmt_list
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
- .ascii "fission-base.dwo\0" # DW_AT_GNU_dwo_name
+ .asciz XSTR(DWO) # DW_AT_GNU_dwo_name
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
.4byte .Ldebug_addr0_begin # DW_AT_GNU_addr_base
standard_testfile .S
+set dwo [standard_output_file "fission-base.dwo"]
+
if [build_executable_from_fission_assembler \
- "$testfile.exp" "$binfile" "$srcfile" {nodebug}] {
+ "$testfile.exp" "$binfile" "$srcfile" \
+ [list nodebug additional_flags=-DDWO=$dwo]] {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-# Make sure we can find the .dwo file, regardless of whether we're
-# running in parallel mode.
-gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
- "set debug-file-directory"
-gdb_load $binfile
+clean_restart $binfile
if ![runto_main] {
return -1
return init (&argc);
}
*/
+#define XSTR(s) STR(s)
+#define STR(s) #s
.file "fission-loclists-pie.c"
.text
.LASF1:
.string "/tmp/19999/obj64/gdb/testsuite"
.LASF0:
- .string "fission-loclists-pie.dwo"
+ .string XSTR(DWO)
.section .debug_str_offsets.dwo,"e",@progbits
.long 0 # indexed string 0x0: argv
.long 0x5 # indexed string 0x1: argc
standard_testfile .S
+set dwo [standard_output_file "fission-loclists-pie.dwo"]
+
if [build_executable_from_fission_assembler \
"$testfile.exp" "$binfile" "$srcfile" \
- [list "nodebug" "ldflags=-pie"]] {
+ [list "nodebug" "ldflags=-pie" additional_flags=-DDWO=$dwo]] {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-# Make sure we can find the .dwo file, regardless of whether we're
-# running in parallel mode.
-gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
- "set debug-file-directory"
-gdb_load $binfile
+clean_restart $binfile
if ![runto_main] {
return -1
}
*/
+#define XSTR(s) STR(s)
+#define STR(s) #s
+
.file "fission-loclists.c"
.text
.Ltext0:
.byte 0x5
.4byte .Ldebug_ranges0 # DW_AT_GNU_ranges_base
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
- .ascii "fission-loclists.dwo\0" # DW_AT_GNU_dwo_name
+ .asciz XSTR(DWO) # DW_AT_GNU_dwo_name
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
.4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
standard_testfile .S
+set dwo [standard_output_file "fission-loclists.dwo"]
+
if [build_executable_from_fission_assembler \
- "$testfile.exp" "$binfile" "$srcfile" {nodebug}] {
+ "$testfile.exp" "$binfile" "$srcfile" \
+ [list nodebug additional_flags=-DDWO=$dwo]] {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-# Make sure we can find the .dwo file, regardless of whether we're
-# running in parallel mode.
-gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
- "set debug-file-directory"
-gdb_load $binfile
+clean_restart $binfile
if ![runto_main] {
return -1
and then massaging the output.
*/
+
+#define XSTR(s) STR(s)
+#define STR(s) #s
+
.text
.file "llvm-link"
.globl func
.section .debug_str,"MS",@progbits,1
.Lskel_string0:
- .asciz "fission-multi-cu.dwo" # string offset=0
+ .asciz XSTR(DWO) # string offset=0
.Lskel_string1:
.asciz "/tmp/src/gdb/testsuite" # string offset=21
.section .debug_loc.dwo,"",@progbits
standard_testfile .S
+set dwo [standard_output_file "fission-multi-cu.dwo"]
+
if [build_executable_from_fission_assembler \
- "$testfile.exp" "$binfile" "$srcfile" {nodebug}] {
+ "$testfile.exp" "$binfile" "$srcfile" \
+ [list nodebug additional_flags=-DDWO=$dwo]] {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-# Make sure we can find the .dwo file, regardless of whether we're
-# running in parallel mode.
-gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
- "set debug-file-directory"
-gdb_load $binfile
+clean_restart $binfile
if ![runto_main] {
return -1
# define SYMBOL(str) str
#endif
+#define XSTR(s) STR(s)
+#define STR(s) #s
+
.file "fission-reread.cc"
.globl SYMBOL(baz)
.4byte 0 /* Offset to Type DIE */
.uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
- .ascii "fission-reread.dwo\0" /* DW_AT_GNU_dwo_name */
+ .asciz XSTR(DWO) /* DW_AT_GNU_dwo_name */
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
.4byte .Letext0-.Ltext0 /* DW_AT_high_pc */
.4byte .Ldebug_line0 /* DW_AT_stmt_list */
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
- .ascii "fission-reread.dwo\0" /* DW_AT_GNU_dwo_name */
+ .asciz XSTR(DWO) /* DW_AT_GNU_dwo_name */
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
standard_testfile .S
+set dwo [standard_output_file "fission-reread.dwo"]
+
+set options [list]
+lappend options nodebug
+if { $additional_flags != "" } {
+ lappend options $additional_flags
+}
+lappend options additional_flags=-DDWO=$dwo
+
if [build_executable_from_fission_assembler \
- "$testfile.exp" "$binfile" "$srcfile" \
- [list nodebug $additional_flags]] {
+ "$testfile.exp" "$binfile" "$srcfile" $options] {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-# Make sure we can find the .dwo file, regardless of whether we're
-# running in parallel mode.
-gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
- "set debug-file-directory"
-gdb_load $binfile
+clean_restart $binfile
gdb_test "break -q main" "Breakpoint.*at.*"