aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.ada/extended-access.exp10
-rw-r--r--gdb/testsuite/gdb.ada/variant_record_field.exp2
-rw-r--r--gdb/testsuite/gdb.tui/corefile-run.exp58
3 files changed, 52 insertions, 18 deletions
diff --git a/gdb/testsuite/gdb.ada/extended-access.exp b/gdb/testsuite/gdb.ada/extended-access.exp
index 7c02ad7..c54c5f6 100644
--- a/gdb/testsuite/gdb.ada/extended-access.exp
+++ b/gdb/testsuite/gdb.ada/extended-access.exp
@@ -21,9 +21,17 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
return
}
+# For riscv64-linux, we need to run to main, or the_array.p_array will still
+# be nullptr.
+if {![runto "main"]} {
+ return
+}
+
# The test case is written in C, because it was easy to make the
# required type there without requiring a new version of GNAT.
-gdb_test_no_output "set lang ada"
+gdb_test "set lang ada" \
+ [string_to_regexp \
+ "Warning: the current language does not match this frame."]
gdb_test "print the_array.all" \
[string_to_regexp " = (93 => 23, 24, 25, 26, 27)"]
diff --git a/gdb/testsuite/gdb.ada/variant_record_field.exp b/gdb/testsuite/gdb.ada/variant_record_field.exp
index fb5361d..1308810 100644
--- a/gdb/testsuite/gdb.ada/variant_record_field.exp
+++ b/gdb/testsuite/gdb.ada/variant_record_field.exp
@@ -46,7 +46,7 @@ gdb_test_multiple "$test" "$test" {
pass $test
}
-re "\\(kind => five, i => <error reading variable: access outside bounds of object>" {
- if { [gcc_major_version] <= 14 } {
+ if { [gnat_version_compare < 15] } {
setup_xfail *-*-*
}
fail $test
diff --git a/gdb/testsuite/gdb.tui/corefile-run.exp b/gdb/testsuite/gdb.tui/corefile-run.exp
index 657fc83..03775be 100644
--- a/gdb/testsuite/gdb.tui/corefile-run.exp
+++ b/gdb/testsuite/gdb.tui/corefile-run.exp
@@ -48,26 +48,52 @@ set src_line_nr [gdb_get_line_number $src_line]
set run_re \
"\\\[Inferior $decimal \\\(process $decimal\\\) exited normally\\]"
-if { [info exists USE_TUI] && $USE_TUI == 0 } {
+with_test_prefix cli {
+ set re_kfail \
+ "[string_to_regexp fbsd-nat.c]:$decimal: internal-error: wait_1: "
+ set re_quit [string_to_regexp "Quit this debugging session? (y or n) "]
+ set re_core_file [string_to_regexp "Create a core file of GDB? (y or n) "]
clean_restart $testfile
gdb_test "core-file $core" $src_line "load corefile"
- gdb_test "run" $run_re "run until the end"
- return
+ set ok 0
+ gdb_test_multiple "run" "run until the end" {
+ -early -re $re_kfail {
+ kfail tdep/33176 $gdb_test_name
+ # Get back gdb prompt.
+ gdb_expect {
+ -re ($re_quit|$re_core_file) {
+ send_gdb "n\n"
+ exp_continue
+ }
+ -re "$gdb_prompt " {
+ }
+ }
+ }
+ -re -wrap $run_re {
+ set ok 1
+ pass $gdb_test_name
+ }
+ }
+ if {!$ok} {
+ return
+ }
}
-Term::clean_restart 24 80 $testfile
-if {![Term::enter_tui]} {
- unsupported "TUI not supported"
- return
-}
+with_test_prefix tui {
+ Term::clean_restart 24 80 $testfile
+ if {![Term::enter_tui]} {
+ unsupported "TUI not supported"
+ return
+ }
-set text [Term::get_all_lines]
-gdb_assert {![string match "No Source Available" $text]} \
- "initial source listing"
+ set text [Term::get_all_lines]
+ gdb_assert {![string match "No Source Available" $text]} \
+ "initial source listing"
-send_gdb "core-file $core\n"
-Term::wait_for "Program terminated"
-Term::check_contents "load corefile" "$src_line_nr *$src_line.*$gdb_prompt .*"
+ send_gdb "core-file $core\n"
+ Term::wait_for "Program terminated"
+ Term::check_contents "load corefile" "$src_line_nr *$src_line.*$gdb_prompt .*"
-Term::command "run"
-Term::check_contents "run until the end" $run_re
+ Term::command "run"
+ Term::check_contents "run until the end" $run_re
+}