This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog break-catch-sig.c breakpoint ...


CVSROOT:	/cvs/src
Module name:	src
Branch: 	gdb_7_6-branch
Changes by:	tromey@sourceware.org	2013-08-30 15:58:55

Modified files:
	gdb            : ChangeLog break-catch-sig.c breakpoint.c 
	                 breakpoint.h infrun.c 
	gdb/testsuite  : ChangeLog 
Added files:
	gdb/testsuite/gdb.base: random-signal.c random-signal.exp 

Log message:
	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.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.15260.2.59&r2=1.15260.2.60
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/break-catch-sig.c.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.3&r2=1.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.c.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.745.2.7&r2=1.745.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.h.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.193.2.1&r2=1.193.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/infrun.c.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.576&r2=1.576.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.3580.2.24&r2=1.3580.2.25
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/random-signal.c.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=NONE&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/random-signal.exp.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=NONE&r2=1.1.2.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]