From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: "Ulrich Weigand" <uweigand@de.ibm.com>
Subject: Re: [commit] Re: [rfc][1/2] Signal delivery + software single-step is broken
Date: Wed, 27 Apr 2011 19:44:00 -0000 [thread overview]
Message-ID: <201104272043.59607.pedro@codesourcery.com> (raw)
In-Reply-To: <201104271911.p3RJBrEY005667@d06av02.portsmouth.uk.ibm.com>
On Wednesday 27 April 2011 20:11:53, Ulrich Weigand wrote:
> :-)
> The problem is that if a step-resume breakpoint is installed,
> handle_inferior_event will never expect hardware single-step
> traps (unless a software watchpoint is also in effect), because
> it assumes nobody ever uses a step-resume breakpoint and then
> hardware single-steps as well (because currently_stepping
> returns 0 in that case).
>
> The simple way to fix the inconsistency would be to just add a
> step = 0;
> line to the above if. Of course this changes the behaviour for
> hardware single-step platforms: they now would not step into
> the signal handler in this case (just like software single-step
> platforms don't).
>
> On the one hand, this adds consistency: both types of platforms
> behave the same.
IIUC, with that change alone, the behavior on hw-step archs
would change depending on there being a breakpoint at PC or
not. Without a breakpoint, you'd step into the handler, with
a breakpoint, you'd not.
> (On software single-step platforms, it seems
> we simply cannot step into the handler, because we can't find
> it.)
IMO, this could/should be fixed with kernel help.
>
> On the other hand, in some sense this reduces functionality.
> So one could try to treat the two platforms separately, and
> have hardware single-step platforms step into the handler,
> even while software single-step platforms don't.
>
> [ This would probably mean to move support back into resume,
> because we'd want to do that only if we actually use software
> single-step for this particular step. ]
>
> Thoughts? Which behaviour would you prefer?
I'd prefer to keep the possibility to step into a handler.
I find this very useful when you don't actually know what
handler is installed. Much easier than grepping for "signal" and
trying to guess what is installed (which may even have been done
by some external dependency / library).
--
Pedro Alves
next prev parent reply other threads:[~2011-04-27 19:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 16:43 Ulrich Weigand
2011-04-27 17:17 ` [commit] " Ulrich Weigand
2011-04-27 18:15 ` Pedro Alves
2011-04-27 19:12 ` Ulrich Weigand
2011-04-27 19:44 ` Pedro Alves [this message]
2011-04-28 8:55 ` [patch] " Ulrich Weigand
2011-04-28 12:01 ` Pedro Alves
2011-04-28 15:18 ` [patch v2] " Ulrich Weigand
2011-04-28 15:46 ` Pedro Alves
2011-04-28 16:04 ` Ulrich Weigand
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=201104272043.59607.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/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