From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28626 invoked by alias); 18 Jun 2013 19:57:52 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 28594 invoked by uid 55); 18 Jun 2013 19:57:52 -0000 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior Date: Tue, 18 Jun 2013 19:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: cli X-Bugzilla-Version: 7.6 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at redhat dot com X-Bugzilla-Target-Milestone: 7.6 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q2/txt/msg00442.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15603 --- Comment #4 from cvs-commit at gcc dot gnu.org --- CVSROOT: /cvs/src Module name: src Changes by: tromey@sourceware.org 2013-06-18 19:57:49 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: 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) : 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&r1=1.15711&r2=1.15712 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/break-catch-sig.c.diff?cvsroot=src&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.c.diff?cvsroot=src&r1=1.765&r2=1.766 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.h.diff?cvsroot=src&r1=1.198&r2=1.199 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/infrun.c.diff?cvsroot=src&r1=1.583&r2=1.584 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3698&r2=1.3699 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/random-signal.c.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/random-signal.exp.diff?cvsroot=src&r1=NONE&r2=1.1 -- You are receiving this mail because: You are on the CC list for the bug.