binutils-gdb/gdb/testsuite
Tom Tromey 427cd150ee Fix PR cli/15603
This fixes PR cli/15603.

The bug here is that when a software watchpoint is being used, gdb
will stop responding to C-c.  This is a regression caused by the
"catch signal" patch.

The problem is that software watchpoints always end up on the bpstat
list.  However, this makes bpstat_explains_signal return
BPSTAT_SIGNAL_HIDE, causing infrun to think that the signal is not a
"random signal".

The fix is to change bpstat_explains_signal to handle this better.  I
chose to do it in a "clean API" way, by passing the signal value to
bpstat_explains_signal and then adding an explains_signal method for
watchpoints, which handles the specifics.

Built and regtested on x86-64 Fedora 18.
New test case included.

	* break-catch-sig.c (signal_catchpoint_explains_signal): Add 'sig'
	argument.
	* breakpoint.c (bpstat_explains_signal): Add 'sig' argument.
	Special case signals other than GDB_SIGNAL_TRAP.
	(explains_signal_watchpoint): New function.
	(base_breakpoint_explains_signal): Add 'sig' argument.
	(initialize_breakpoint_ops): Set 'explains_signal' method for
	watchpoints.
	* breakpoint.h (struct breakpoint_ops) <explains_signal>: Add
	signal argument.
	(bpstat_explains_signal): Likewise.
	* infrun.c (handle_syscall_event, handle_inferior_event): Update.

	* gdb.base/random-signal.c: New file.
	* gdb.base/random-signal.exp: New file.
2013-06-18 19:57:49 +00:00
..
boards Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
config Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.ada
gdb.arch Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.asm Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.base Fix PR cli/15603 2013-06-18 19:57:49 +00:00
gdb.btrace
gdb.cell
gdb.cp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.disasm Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.dwarf2 Fix PR symtab/15391 2013-06-18 18:11:19 +00:00
gdb.fortran
gdb.gdb fix python-selftest.exp failure with gdbserver 2013-06-18 14:12:09 +00:00
gdb.go
gdb.hp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.java
gdb.linespec
gdb.mi Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.modula2
gdb.multi
gdb.objc
gdb.opencl
gdb.opt
gdb.pascal Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.python Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.reverse
gdb.server
gdb.stabs
gdb.threads Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.trace Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.xml
lib Fix PR symtab/15391 2013-06-18 18:11:19 +00:00
aclocal.m4
ChangeLog Fix PR cli/15603 2013-06-18 19:57:49 +00:00
configure
configure.ac
dg-extract-results.sh
Makefile.in
TODO