aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog13
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-base.S5
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-base.exp14
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp13
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-loclists.S5
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-loclists.exp14
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-multi-cu.S6
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp14
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-reread.S7
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-reread.exp21
11 files changed, 64 insertions, 52 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 36ba5d0..a557765 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+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
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.S b/gdb/testsuite/gdb.dwarf2/fission-base.S
index e65cc5e..5e10713 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.S
@@ -20,6 +20,9 @@
and then massaging the output.
*/
+#define XSTR(s) STR(s)
+#define STR(s) #s
+
.file "fission-base.c"
.text
@@ -143,7 +146,7 @@ main:
.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
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp
index 01b5c82..40a7e2a 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
@@ -32,19 +32,15 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
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
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S
index 6981760..e87ca36 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.S
@@ -33,6 +33,8 @@
return init (&argc);
}
*/
+#define XSTR(s) STR(s)
+#define STR(s) #s
.file "fission-loclists-pie.c"
.text
@@ -461,7 +463,7 @@ main:
.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
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
index e2f3c69..c0a7785 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
@@ -37,20 +37,15 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
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
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.S b/gdb/testsuite/gdb.dwarf2/fission-loclists.S
index b4d954b..c40b956 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.S
@@ -33,6 +33,9 @@
}
*/
+#define XSTR(s) STR(s)
+#define STR(s) #s
+
.file "fission-loclists.c"
.text
.Ltext0:
@@ -240,7 +243,7 @@ main:
.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
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
index 8e6b999..54eace0 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
@@ -32,19 +32,15 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
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
diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.S b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.S
index c9bb07e..df83613 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.S
@@ -23,6 +23,10 @@
and then massaging the output.
*/
+
+#define XSTR(s) STR(s)
+#define STR(s) #s
+
.text
.file "llvm-link"
.globl func
@@ -80,7 +84,7 @@ main: # @main
.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
diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
index d1db1c9..dec7547 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
@@ -32,19 +32,15 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
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
diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.S b/gdb/testsuite/gdb.dwarf2/fission-reread.S
index 92087aa..dd1ffcd 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.S
@@ -47,6 +47,9 @@
# define SYMBOL(str) str
#endif
+#define XSTR(s) STR(s)
+#define STR(s) #s
+
.file "fission-reread.cc"
.globl SYMBOL(baz)
@@ -143,7 +146,7 @@ SYMBOL(main):
.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 */
@@ -214,7 +217,7 @@ SYMBOL(main):
.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 */
diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
index 074e535..b97c48a 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
@@ -30,20 +30,21 @@ set additional_flags [gdb_target_symbol_prefix_flags_asm]
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.*"