X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Ftestsuite%2Fgdb.base%2Fsiginfo-addr.exp;h=ba2965db3a516c17580e09d920945ed9146267a5;hb=bd5766ec689140aa80e5d4fd5c0bf9c990f5a38b;hp=236dd952cc7251e526ce7ad79e204fcc82b6ce58;hpb=28e7fd62340426746f9c896cbc40c5d374ec47aa;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/testsuite/gdb.base/siginfo-addr.exp b/gdb/testsuite/gdb.base/siginfo-addr.exp index 236dd952cc..ba2965db3a 100644 --- a/gdb/testsuite/gdb.base/siginfo-addr.exp +++ b/gdb/testsuite/gdb.base/siginfo-addr.exp @@ -1,4 +1,4 @@ -# Copyright 2004-2013 Free Software Foundation, Inc. +# Copyright 2004-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 @@ -26,42 +26,23 @@ if [target_info exists gdb,nosignals] { continue } -if [gdb_skip_stdio_test "siginfo-addr.exp"] { - continue -} - - -set testfile siginfo-addr -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "Couldn't compile ${srcfile}.c" +standard_testfile +if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { return -1 } -# get things started -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - gdb_test "display/i \$pc" # Advance to main -if { ![runto_main] } then { - gdb_suppress_tests; +if ![runto_main] then { + fail "can't run to main" + return 0 } # Run to the signal. gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal" +gdb_breakpoint "pass" + # Check for correct si_addr. -set test "program exit" -gdb_test_multiple "continue" "${test}" { - -re "Correct si_addr" { - pass "si_addr value" - } - -re "Got si_addr" { - fail "si_addr value" - } -} +gdb_test "continue" "Breakpoint .* pass .*" "correct si_addr"