Remove Cell Broadband Engine debugging support
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / gdb2495.exp
index c501b9064d5a927ee995a902883303f065df7b4c..a7de2ccbc2a0c596c1ffbeabd57b007e6a7bd027 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2009, 2010 Free Software Foundation, Inc.
+# Copyright 2009-2019 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
 
 # This test is largely based of gdb.base/callfuncs.exp.
 
-if $tracelevel then {
-    strace $tracelevel
-}
-
 if { [skip_cplus_tests] } { continue }
 
 if [target_info exists gdb,nosignals] {
@@ -42,38 +38,24 @@ if [target_info exists gdb,nosignals] {
     continue
 }
 
-# On SPU this test fails because the executable exceeds local storage size.
-if { [istarget "spu*-*-*"] } {
-        return 0
-}
-
-set testfile "gdb2495"
-set srcfile ${testfile}.cc
-set binfile $objdir/$subdir/$testfile
+standard_testfile .cc
 
 # Create and source the file that provides information about the compiler
 # used to compile the test case.
-if [get_compiler_info ${binfile} "c++"] {
+if [get_compiler_info "c++"] {
     return -1
 }
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
-     untested gdb2495.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
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
+    return -1
+}
 
 if ![runto_main] then {
     perror "couldn't run to main"
@@ -93,7 +75,7 @@ gdb_test "p exceptions.throw_function_with_handler()" " = 2"
 # does not handle it.  It should be rewound.
 gdb_test "p exceptions.throw_function()" \
     "The program being debugged entered a std::terminate call, .*" \
-    "Call a function that raises an exception without a handler."
+    "call a function that raises an exception without a handler."
 
 # Make sure that after rewinding we are back at the call parent.
 gdb_test "bt" \
@@ -104,24 +86,20 @@ gdb_test "bt" \
 # call and that the std::terminate breakpoint has evaporated and
 # cleaned-up.
 gdb_test "info breakpoints" \
-    "gdb.cp/gdb2495\.cc.*"
+    "gdb2495\.cc.*"
 
 # Turn off this new behaviour.
-gdb_test_multiple "set unwind-on-terminating-exception off" \
-    "Turn unwind-on-terminating-exception off" {
-    -re "$gdb_prompt $" {pass "set unwinn-on-terminating-exception off"}
-    timeout {fail "(timeout) set unwind-on-terminating-exception off"}
-}
+gdb_test_no_output "set unwind-on-terminating-exception off"
 
 # Check that it is turned off.
 gdb_test "show unwind-on-terminating-exception" \
     "exception is unhandled while in a call dummy is off.*" \
-    "Turn off unwind on terminating exception flag"
+    "turn off unwind on terminating exception flag"
 
 # Check that the old behaviour is restored.
 gdb_test "p exceptions.throw_function()" \
     "The program being debugged was signaled while in a function called .*" \
-    "Call a function that raises an exception with unwinding off.."
+    "call a function that raises an exception with unwinding off.."
 
 # Restart the inferior back at main.
 if ![runto_main] then {
@@ -134,15 +112,12 @@ if ![runto_main] then {
 # behaviour; it should not.  Test both on and off states.
 
 # Turn on unwind on signal behaviour.
-gdb_test_multiple "set unwindonsignal on" "Turn unwindonsignal on" {
-    -re "$gdb_prompt $" {pass "set unwindonsignal on"}
-    timeout {fail "(timeout) set unwindonsignal on"}
-}
+gdb_test_no_output "set unwindonsignal on"
 
 # Check that it is turned on.
 gdb_test "show unwindonsignal" \
     "signal is received while in a call dummy is on.*" \
-    "Turn on unwind on signal"
+    "turn on unwind on signal"
 
 # Check to see if new behaviour interferes with
 # normal signal handling in inferior function calls.
@@ -150,15 +125,12 @@ gdb_test "p exceptions.raise_signal(1)" \
     "To change this behavior use \"set unwindonsignal off\".*"
 
 # And reverse - turn off again.
-gdb_test_multiple "set unwindonsignal off" "Turn unwindonsignal off" {
-    -re "$gdb_prompt $" {pass "set unwindonsignal off"}
-    timeout {fail "(timeout) set unwindonsignal off"}
-}
+gdb_test_no_output "set unwindonsignal off"
 
 # Check that it is actually turned off.
 gdb_test "show unwindonsignal" \
     "signal is received while in a call dummy is off.*" \
-    "Turn off unwind on signal"
+    "turn off unwind on signal"
 
 # Check to see if new behaviour interferes with
 # normal signal handling in inferior function calls.
This page took 0.02684 seconds and 4 git commands to generate.