diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-01-24 22:00:59 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-01-24 22:00:59 +0000 |
commit | 9d799f85e0e1acb6a49a6b7428d3845d8dba9588 (patch) | |
tree | 910568d780f2321c075edcf19424ab6044cd45e2 /gdb/testsuite/gdb.base/sigrepeat.exp | |
parent | 45181ed16d3a823fbd73ee23d94833f5aa906b98 (diff) | |
download | gdb-9d799f85e0e1acb6a49a6b7428d3845d8dba9588.zip gdb-9d799f85e0e1acb6a49a6b7428d3845d8dba9588.tar.gz gdb-9d799f85e0e1acb6a49a6b7428d3845d8dba9588.tar.bz2 |
Index: ChangeLog
2005-01-24 Andrew Cagney <cagney@gnu.org>
* infrun.c (handle_inferior_event): Handle back-to-back and nested
signals where the step_resume_breakpoint may have already been
inserted.
Index: testsuite/ChangeLog
2005-01-24 Andrew Cagney <cagney@gnu.org>
* gdb.base/sigrepeat.exp, gdb.base/sigrepeat.c: New test.
Diffstat (limited to 'gdb/testsuite/gdb.base/sigrepeat.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/sigrepeat.exp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/sigrepeat.exp b/gdb/testsuite/gdb.base/sigrepeat.exp new file mode 100644 index 0000000..7abe68f --- /dev/null +++ b/gdb/testsuite/gdb.base/sigrepeat.exp @@ -0,0 +1,62 @@ +# Copyright 2004, 2005 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. + + +# The program sigrepeat.c creates a repeating timer and then waits for +# it to fire multiple times. The objective is to create a backlog if +# sigalrm signals and hence cause repeated signal delivery without any +# cpu advancment. + +if [target_info exists gdb,nosignals] { + verbose "Skipping sigstep.exp because of nosignals." + continue +} + +if $tracelevel then { + strace $tracelevel +} + +set prms_id 0 +set bug_id 0 + +set testfile sigrepeat +set srcfile ${testfile}.c +set binfile ${objdir}/${subdir}/${testfile} +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile ${module}.c" + return -1 +} + +# get things started +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir +gdb_load ${binfile} + +# Advance to main +if { ![runto_main] } then { + gdb_suppress_tests; +} + +# Run to the signal handler wait loop. +set infinite_loop [gdb_get_line_number {infinite loop}] +gdb_test "advance $infinite_loop" "" "advance to infinite loop" + +# Make the first of many signals come pending +sleep 1 + +# Try to step off this line +gdb_test "next" "return 0;.*" |