From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH/RFC] Signals & single-stepping
Date: Wed, 30 Sep 2009 16:25:00 -0000 [thread overview]
Message-ID: <20090930162513.GA10304@caradoc.them.org> (raw)
In-Reply-To: <200909301440.n8UEevPb017814@brahms.sibelius.xs4all.nl>
On Wed, Sep 30, 2009 at 04:40:57PM +0200, Mark Kettenis wrote:
> A while ago Daniel made a change to infcmd.c which broke hitting
> breakpoints in signal handlers while single-stepping on OpenBSD (and
> probably other ptrace-based native targets):
>
> 2009-01-20 Daniel Jacobowitz <dan@codesourcery.com>
>
> PR gdb/9346
> * infcmd.c (signal_command): Do not specify a resume PC.
>
> The problem is that breakpoints are removed for single-stepping. So
> the diff below fixes things. Now it isn't clear to me if this
> approach doesn't reintroduce the problem from the PR that Daniel tried
> to fix.
>
> Comments?
Your patch doesn't reintroduce the problem from the PR, and the new
tests in interrupt.exp pass on x86_64-linux. I would really love
someone else to volunteer to review it though - trap_expected confuses
me horribly. I'd guess this change could lead to hitting (and
displaying) the breakpoint at the current PC a second time, which is
undesirable. On the other hand it might fix some of the signal tests
on software single-step targets...
>
>
> Index: infrun.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/infrun.c,v
> retrieving revision 1.410
> diff -u -p -r1.410 infrun.c
> --- infrun.c 29 Sep 2009 00:53:04 -0000 1.410
> +++ infrun.c 30 Sep 2009 12:55:46 -0000
> @@ -1604,6 +1604,11 @@ proceed (CORE_ADDR addr, enum target_sig
> else if (!signal_program[tp->stop_signal])
> tp->stop_signal = TARGET_SIGNAL_0;
>
> + if (tp->stop_signal != TARGET_SIGNAL_0) {
> + tp->trap_expected = 0;
> + insert_breakpoints ();
> + }
> +
> annotate_starting ();
>
> /* Make sure that output from GDB appears before output from the
>
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2009-09-30 16:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 14:41 Mark Kettenis
2009-09-30 16:25 ` Daniel Jacobowitz [this message]
2009-10-01 14:51 ` Pedro Alves
2009-10-01 16:14 ` Pedro Alves
2009-10-01 16:44 ` Daniel Jacobowitz
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=20090930162513.GA10304@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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