Eliminate is_remote check in gdb.base/shlib-call.exp
authorPedro Alves <palves@redhat.com>
Fri, 13 Oct 2017 09:11:57 +0000 (10:11 +0100)
committerPedro Alves <palves@redhat.com>
Fri, 13 Oct 2017 09:22:09 +0000 (10:22 +0100)
gdb/testsuite/ChangeLog:
2017-10-13  Pedro Alves  <palves@redhat.com>

* gdb.base/shlib-call.exp (top level): Use gdb_run_cmd and remove
is_remote target check.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/shlib-call.exp

index 38add6f50b21769407e9401eba8bf9f8cbe99f82..9aac613e24730d8ba7db91b55b541e1f237ff829 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-13  Pedro Alves  <palves@redhat.com>
+
+       * gdb.base/shlib-call.exp (top level): Use gdb_run_cmd and remove
+       is_remote target check.
+
 2017-10-13  Pedro Alves  <palves@redhat.com>
 
        * gdb.base/scope.exp: Use build_executable + clean_restart +
index e1664da1a833b19158c7b51c08451d9bdf8b91d6..2c9b4957aa920c98e56069f3680542bcde2156c5 100644 (file)
@@ -170,18 +170,22 @@ gdb_test_no_output "set width 0"
 # test that we can re-set breakpoints in shared libraries
 gdb_breakpoint "shr1" "allow-pending"
 
-# FIXME: should not send "run" explicitly.  Non-portable.
-
-if ![is_remote target] {
-  gdb_test "run" "Starting program:.*Breakpoint .,.*" \
-       "run to bp in shared library"
-
-  gdb_continue_to_end "" continue 1
+set test "run to bp in shared library"
+gdb_run_cmd
+gdb_test_multiple "" $test {
+    -re "Breakpoint .,.*${gdb_prompt} " {
+       pass $test
+    }
+}
 
-  gdb_test "run" "Starting program:.*Breakpoint .,.*" \
-       "re-run to bp in shared library (PR's 16495, 18213)"
+gdb_continue_to_end "" continue 1
 
-  gdb_continue_to_end "" continue 1
+set test "re-run to bp in shared library (PR's 16495, 18213)"
+gdb_run_cmd
+gdb_test_multiple "" $test {
+    -re "Breakpoint .,.*${gdb_prompt} " {
+       pass $test
+    }
 }
 
-return 0
+gdb_continue_to_end "" continue 1