public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-15603-4717-z7Xk7v1Wah@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15603-4717@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=15603

--- Comment #4 from cvs-commit at gcc dot gnu.org <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) <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&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.


  parent reply	other threads:[~2013-06-18 19:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 16:28 [Bug cli/15603] New: " jan.kratochvil at redhat dot com
2013-06-11 16:29 ` [Bug cli/15603] " sergiodj at redhat dot com
2013-06-11 18:17 ` jan.kratochvil at redhat dot com
2013-06-11 18:44 ` jan.kratochvil at redhat dot com
2013-06-12 19:38 ` tromey at redhat dot com
2013-06-13 19:03 ` tromey at redhat dot com
2013-06-18 19:57 ` cvs-commit at gcc dot gnu.org [this message]
2013-06-18 20:02 ` tromey at redhat dot com
2013-06-18 20:19 ` jan.kratochvil at redhat dot com
2013-08-30 15:58 ` cvs-commit at gcc dot gnu.org
2013-08-30 16:05 ` tromey at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15603-4717-z7Xk7v1Wah@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).