public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior
@ 2013-06-11 16:28 jan.kratochvil at redhat dot com
2013-06-11 16:29 ` [Bug cli/15603] " sergiodj at redhat dot com
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-06-11 16:28 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15603
Bug ID: 15603
Summary: [7.6 regression] CTRL-C can no longer interrupt
inferior
Product: gdb
Version: 7.6
Status: NEW
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: jan.kratochvil at redhat dot com
CC: palves at redhat dot com, tromey at redhat dot com
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
echo 'int v;main(){for(;;);}'|cc -x c -;gdb ./a.out -ex start -ex 'set
can-use-hw-watchpoints 0' -ex 'watch v' -ex c
Temporary breakpoint 1, 0x00000000004004f0 in main ()
Watchpoint 2: v
Continuing.
CTRL-C
7.5 PASS:
Program received signal SIGINT, Interrupt.
0x00000000004004f0 in main ()
(gdb) _
7.6 FAIL:
<nothing, hanging>
3b0f7442800817f8a19b8eebd3b897a75328af14 is the first bad commit
commit 3b0f7442800817f8a19b8eebd3b897a75328af14
Author: Tom Tromey <tromey@redhat.com>
Date: Wed Jan 16 17:31:35 2013 +0000
PR cli/7221:
RFC: implement "catch signal"
http://sourceware.org/bugzilla/show_bug.cgi?id=7221
Message-ID: <874nkpv03j.fsf@fleche.redhat.com>
http://sourceware.org/ml/gdb-patches/2012-11/msg00470.html
http://sourceware.org/ml/gdb-patches/2012-12/msg00009.html
http://sourceware.org/ml/gdb-patches/2013-01/msg00049.html
RFA: [2/2] catch signal
http://sourceware.org/ml/gdb-patches/2013-01/msg00051.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior jan.kratochvil at redhat dot com
@ 2013-06-11 16:29 ` sergiodj at redhat dot com
2013-06-11 18:17 ` jan.kratochvil at redhat dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sergiodj at redhat dot com @ 2013-06-11 16:29 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15603
Sergio Durigan Junior <sergiodj at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sergiodj at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior 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
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-06-11 18:17 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15603
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jan.kratochvil at redhat dot com
--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
This commit is wrongly found, looking for the right one.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior 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
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-06-11 18:44 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15603
--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
Comment 1 was a mistake, it is really the commit in Comment 0.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior jan.kratochvil at redhat dot com
` (2 preceding siblings ...)
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
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-06-12 19:38 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15603
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior jan.kratochvil at redhat dot com
` (3 preceding siblings ...)
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
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-06-13 19:03 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15603
--- Comment #3 from Tom Tromey <tromey at redhat dot com> ---
The basic problem is that the patch removed some code that used to set
random_signal. Instead the new code now always relies on the bpstat.
However, software watchpoints are always put on the bpstat list, so
bpstat_explains_signal always returns at least BPSTAT_SIGNAL_HIDE.
This hides the SIGINT.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior jan.kratochvil at redhat dot com
` (4 preceding siblings ...)
2013-06-13 19:03 ` tromey at redhat dot com
@ 2013-06-18 19:57 ` cvs-commit at gcc dot gnu.org
2013-06-18 20:02 ` tromey at redhat dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-06-18 19:57 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior jan.kratochvil at redhat dot com
` (5 preceding siblings ...)
2013-06-18 19:57 ` cvs-commit at gcc dot gnu.org
@ 2013-06-18 20:02 ` tromey at redhat dot com
2013-06-18 20:19 ` jan.kratochvil at redhat dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-06-18 20:02 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15603
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|7.6 |7.7
--- Comment #5 from Tom Tromey <tromey at redhat dot com> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior jan.kratochvil at redhat dot com
` (6 preceding siblings ...)
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
9 siblings, 0 replies; 11+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-06-18 20:19 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15603
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
Target Milestone|7.7 |7.6
--- Comment #6 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
This should be fixed in 7.6.1, it was a real regression I faced as a user.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior jan.kratochvil at redhat dot com
` (7 preceding siblings ...)
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
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-08-30 15:58 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15603
--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
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
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug cli/15603] [7.6 regression] CTRL-C can no longer interrupt inferior
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior jan.kratochvil at redhat dot com
` (8 preceding siblings ...)
2013-08-30 15:58 ` cvs-commit at gcc dot gnu.org
@ 2013-08-30 16:05 ` tromey at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: tromey at redhat dot com @ 2013-08-30 16:05 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=15603
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
Target Milestone|7.6 |7.6.1
--- Comment #8 from Tom Tromey <tromey at redhat dot com> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-08-30 16:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11 16:28 [Bug cli/15603] New: [7.6 regression] CTRL-C can no longer interrupt inferior 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
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
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).