aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ctf
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-03-03 16:51:57 +0100
committerTom de Vries <tdevries@suse.de>2023-03-03 16:51:57 +0100
commit9c2c346137eeca000840023b6d9340274da7a905 (patch)
tree9307bf73a08095c47fd92ee295c6ab2d2c3cad51 /gdb/testsuite/gdb.ctf
parentc35b7b2252323a1afa561ef2d56f5ae1b63b667a (diff)
downloadgdb-9c2c346137eeca000840023b6d9340274da7a905.zip
gdb-9c2c346137eeca000840023b6d9340274da7a905.tar.gz
gdb-9c2c346137eeca000840023b6d9340274da7a905.tar.bz2
[gdb/testsuite] Use set always-read-ctf on instead of --strip-debug
Use "set always-read-ctf on" instead of --strip-debug in the ctf test-cases. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.ctf')
-rw-r--r--gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp7
-rw-r--r--gdb/testsuite/gdb.ctf/funcreturn.exp7
-rw-r--r--gdb/testsuite/gdb.ctf/multi.exp7
3 files changed, 15 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp b/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp
index 0292e39..68b5bee 100644
--- a/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp
+++ b/gdb/testsuite/gdb.ctf/cross-tu-cyclic.exp
@@ -24,15 +24,18 @@ standard_testfile cross-tu-cyclic-1.c cross-tu-cyclic-2.c \
set opts {}
lappend opts additional_flags=-gctf
lappend opts ldflags=-Wl,--export-dynamic
-lappend opts ldflags=-Wl,--strip-debug
lappend opts nowarning
-if { [prepare_for_testing "failed to prepare" ${testfile} \
+if { [build_executable "failed to prepare" ${testfile} \
[list $srcfile $srcfile2 $srcfile3 $srcfile4] \
$opts] } {
return 0
}
+clean_restart
+gdb_test_no_output "set always-read-ctf on"
+gdb_load $binfile
+
# Same thing with struct and union.
gdb_test "ptype struct A" "type = struct A \{\[\r\n\]+\[ \t\]+struct B \\*foo;\[\r\n\]+\}.*" "ptype structure A"
gdb_test "ptype struct B" "type = struct B \{\[\r\n\]+\[ \t\]+struct B \\*next;\[\r\n\]+\}.*" "ptype structure B"
diff --git a/gdb/testsuite/gdb.ctf/funcreturn.exp b/gdb/testsuite/gdb.ctf/funcreturn.exp
index 64ed031..ef1fe90 100644
--- a/gdb/testsuite/gdb.ctf/funcreturn.exp
+++ b/gdb/testsuite/gdb.ctf/funcreturn.exp
@@ -30,14 +30,17 @@ standard_testfile whatis.c
set opts {}
lappend opts additional_flags=-gctf
lappend opts ldflags=-Wl,--export-dynamic
-lappend opts ldflags=-Wl,--strip-debug
lappend opts nowarning
-if { [prepare_for_testing "failed to prepare" ${testfile} \
+if { [build_executable "failed to prepare" ${testfile} \
[list $srcfile] $opts] } {
return 0
}
+clean_restart
+gdb_test_no_output "set always-read-ctf on"
+gdb_load $binfile
+
# test print command with functions return type
set void "(void|)"
gdb_test "print v_char_func" \
diff --git a/gdb/testsuite/gdb.ctf/multi.exp b/gdb/testsuite/gdb.ctf/multi.exp
index c82d1b9..0bb66cd 100644
--- a/gdb/testsuite/gdb.ctf/multi.exp
+++ b/gdb/testsuite/gdb.ctf/multi.exp
@@ -23,15 +23,18 @@ standard_testfile ctf-a.c ctf-b.c ctf-c.c
set opts {}
lappend opts additional_flags=-gctf
lappend opts ldflags=-Wl,--export-dynamic
-lappend opts ldflags=-Wl,--strip-debug
lappend opts nowarning
-if { [prepare_for_testing "failed to prepare" ${testfile} \
+if { [build_executable "failed to prepare" ${testfile} \
[list $srcfile $srcfile2 $srcfile3] \
$opts] } {
return 0
}
+clean_restart
+gdb_test_no_output "set always-read-ctf on"
+gdb_load $binfile
+
# Same thing with struct and union.
gdb_test "ptype struct A" "type = struct A \{\[\r\n\]+\[ \t\]+struct B \\*b;\[\r\n\]+\[ \t\]+struct A \\*next;\[\r\n\]+\}.*" "ptype structure A"
gdb_test "ptype struct B" "type = struct B \{\[\r\n\]+\[ \t\]+struct C \\*c;\[\r\n\]+\[ \t\]+int \\wombat;\[\r\n\]+\}.*" "ptype structure B"