Clarify "list" output when specified lines are ambiguous
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / unwindonsignal.exp
index 29c277d056b4f3098350eb4083d60a1a1dd0e015..54024ff6124ac77ac9dc1725a50874c25224cc5f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2008, 2010 Free Software Foundation, Inc.
+# Copyright 2008-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if $tracelevel then {
-       strace $tracelevel
-}
-
-if [target_info exists gdb,noinferiorio] {
-    verbose "Skipping unwindonsignal.exp because of no fileio capabilities."
-    continue
-}
-
 if [target_info exists gdb,nosignals] {
     verbose "Skipping unwindonsignal.exp because of nosignals."
     continue
 }
 
 
-set testfile "unwindonsignal"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested unwindonsignal.exp
-     return -1
-}
-
 # Some targets can't do function calls, so don't even bother with this
 # test.
 if [target_info exists gdb,cannot_call_functions] {
-    setup_xfail "*-*-*" 2416
-    fail "This target can not call functions"
+    unsupported "this target can not call functions"
     continue
 }
 
-# Start with a fresh gdb.
+standard_testfile
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+    return -1
+}
 
 if { ![runto_main] } {
-    fail "Can't run to main"
+    fail "can't run to main"
     return 0
 }
 
@@ -71,15 +51,10 @@ gdb_test "show unwindonsignal" \
 
 # Call function (causing the program to get a signal), and see if gdb handles
 # it properly.
-gdb_test_multiple "call gen_signal ()" \
-       "unwindonsignal, inferior function call signaled" {
-    -re "\[\r\n\]*no signal\[\r\n\]+$gdb_prompt $" {
-       unsupported "unwindonsignal, inferior function call signaled"
-       return 0
-    }
-    -re "\[\r\n\]*The program being debugged was signaled.*\[\r\n\]+$gdb_prompt $" {
-       pass "unwindonsignal, inferior function call signaled"
-    }
+if {[gdb_test "call gen_signal ()"  \
+        "\[\r\n\]*The program being debugged was signaled.*" \
+        "unwindonsignal, inferior function call signaled"] != 0} {
+    return 0
 }
 
 # Verify the stack got unwound.
This page took 0.026981 seconds and 4 git commands to generate.