⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sigall.exp

📁 lwip在ucos上的移植
💻 EXP
字号:
#   Copyright (C) 1995, 1997 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# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.# # This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.# # You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  if [target_info exists gdb,nosignals] {    verbose "Skipping sigall.exp because of nosignals."    continue}if $tracelevel then {	strace $tracelevel}set prms_id 0set bug_id 0gdb_exitgdb_startgdb_reinitialize_dir $srcdir/$subdirset testfile sigallset srcfile ${testfile}.cset binfile ${objdir}/${subdir}/${testfile}if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."}# Make the first signal SIGABRT because it is always supported.set sig_supported 1set thissig "ABRT"proc test_one_sig {nextsig} {    global sig_supported    global gdb_prompt    global thissig    set this_sig_supported $sig_supported    gdb_test "handle SIG$thissig stop print" \	"SIG$thissig\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes.*"    gdb_test "b handle_$thissig" "Breakpoint \[0-9\]+ .*"    gdb_test "b gen_$nextsig" "Breakpoint \[0-9\]+ .*"    set need_another_continue 1    set missed_handler 0    if $this_sig_supported then {	send_gdb "continue\n"	if { $thissig == "IO" } {	    setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu"	}	gdb_expect {	    -re "Continuing.*Program received signal SIG$thissig.*$gdb_prompt $" {		pass "get signal $thissig"	    }	    -re ".*$gdb_prompt $" {		fail "get signal $thissig"		set need_another_continue 0	    }	    default {		fail "get signal $thissig (eof or timeout)"	    }	}    }    if [ istarget "alpha-dec-osf3*" ] then {	# OSF/1-3.x is unable to continue with a job control stop signal.	# The inferior remains stopped without an event of interest	# and GDB waits forever for the inferior to stop on an event	# of interest. Work around the kernel bug.	if { $thissig == "TSTP" || $thissig == "TTIN" || $thissig == "TTOU" } {	    setup_xfail "alpha-dec-osf3*"	    fail "cannot continue from signal $thissig"	    set need_another_continue 0	}    }    if $need_another_continue then {	send_gdb "continue\n"	if { $thissig == "URG" } {	    setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu"	}        # Either Lynx or GDB screws up on SIGPRIO	if { $thissig == "PRIO" } {	    setup_xfail "*-*-*lynx*"	}	gdb_expect {	    -re "Breakpoint.*handle_$thissig.*$gdb_prompt $" {		pass "send signal $thissig"	    }	    -re "Breakpoint.*gen_$nextsig.*kill.*$gdb_prompt $" {		fail "missed breakpoint at handle_$thissig"		set missed_handler 1	    }	}    }    if { $missed_handler == "0" } then {        send_gdb "signal 0\n"        gdb_expect {	    -re "Breakpoint.*gen_$nextsig.*kill.*$gdb_prompt $" {	        pass "advance to $nextsig"	        set sig_supported 1	    }	    -re "Breakpoint.*gen_$nextsig.*handle.*$gdb_prompt $" {	        pass "advance to $nextsig"	        set sig_supported 0	    }	    -re ".*$gdb_prompt $" { fail "advance to $nextsig" }	    default { fail "advance to $nextsig (eof or timeout)" }        }    }    set thissig $nextsig}gdb_load $binfilerunto gen_ABRTtest_one_sig HUPtest_one_sig QUITtest_one_sig ILLtest_one_sig EMTtest_one_sig FPEtest_one_sig BUStest_one_sig SEGVtest_one_sig SYStest_one_sig PIPEtest_one_sig ALRMtest_one_sig URGtest_one_sig TSTPtest_one_sig CONTtest_one_sig CHLDtest_one_sig TTINtest_one_sig TTOUtest_one_sig IOtest_one_sig XCPUtest_one_sig XFSZtest_one_sig VTALRMtest_one_sig PROFtest_one_sig WINCHtest_one_sig LOSTtest_one_sig USR1test_one_sig USR2test_one_sig PWRtest_one_sig POLLtest_one_sig WINDtest_one_sig PHONEtest_one_sig WAITINGtest_one_sig LWPtest_one_sig DANGERtest_one_sig GRANTtest_one_sig RETRACTtest_one_sig MSGtest_one_sig SOUNDtest_one_sig SAKtest_one_sig PRIOtest_one_sig 33test_one_sig 34test_one_sig 35test_one_sig 36test_one_sig 37test_one_sig 38test_one_sig 39test_one_sig 40test_one_sig 41test_one_sig 42test_one_sig 43test_one_sig 44test_one_sig 45test_one_sig 46test_one_sig 47test_one_sig 48test_one_sig 49test_one_sig 50test_one_sig 51test_one_sig 52test_one_sig 53test_one_sig 54test_one_sig 55test_one_sig 56test_one_sig 57test_one_sig 58test_one_sig 59test_one_sig 60test_one_sig 61test_one_sig 62test_one_sig 63test_one_sig TERM# The last signal (SIGTERM) gets handled slightly differently because# we are not setting up for another test.gdb_test "handle SIGTERM stop print" \    "SIGTERM\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes.*"gdb_test "b handle_TERM" "Breakpoint \[0-9\]+ .*"gdb_test "continue" \    "Continuing.*Program received signal SIGTERM.*" \    "get signal TERM"gdb_test "continue" "Breakpoint.*handle_TERM.*" "send signal TERM"gdb_continue_to_end "continue to sigall exit"return 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -