From: Peter Schauer <peterschauer@gmx.net>
To: palves@redhat.com (Pedro Alves)
Cc: qiyaoltc@gmail.com (Yao Qi),
gdb-patches@sourceware.org,
uweigand@de.ibm.com (Ulrich Weigand)
Subject: Re: [rfc, spu] Don't call set_gdbarch_cannot_step_breakpoint in spu_gdbarch_init
Date: Thu, 02 Apr 2015 09:09:00 -0000 [thread overview]
Message-ID: <201504020909.t3299MbW015585@licht.localdomain> (raw)
In-Reply-To: <551D04AC.7000206@redhat.com> from "Pedro Alves" at Apr 02, 2015 09:58:20 AM
> On 04/01/2015 09:35 PM, Peter Schauer wrote:
>
> > This was needed for alpha OSF/1.
> >
> > Back then it was the only architecture which would not ptrace step
> > over an inserted breakpoint, causing an infinite loop while trying
> > to single step over an inserted breakpoint.
>
> OOC, do you recall whether the infinite loop was that the step didn't
> make progress, and gdb would continuously issue a single-step forever,
> or whether the infinite loop was all in the kernel?
The step didn't make progress and GDB would have continuously issued
a single-step forever.
> > The diff back then was
> >
> > + #ifdef CANNOT_STEP_BREAKPOINT
> > + /* If the target doesn't support stepping over a breakpoint, simply
> > + continue, we will then hit the breakpoint anyway. */
> > + if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
> > + step = 0;
> > + #endif
> >
> > I do not know if GDB ever tries to ptrace step over an inserted
> > breakpoint nowadays, sorry.
>
> It does in some cases when we have a signal to deliver at the
> same time we are trying to step over a breakpoint. Look for
> "signal arrived while stepping over" in infrun.c.
Yeah, that was also the reason why we had to keep the breakpoint
inserted back then.
> > Meanwhile the alpha OSF/1 port is dead anyways...
>
> The setting ended up done for all alpha ports today though, in:
>
> alpha-tdep.c: set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
>
> OSF/1 is gone, but we still support Alpha GNU/Linux, which is also
> taking that code path,. If this was OSF/1 specific, then we could
> get rid of that too, and then get rid of gdbarch_cannot_step_breakpoint
> completely. Anyone have access to Alpha GNU/Linux to try that out?
If it really happens on Alpha GNU/Linux, we could request a fix from the
kernel folks and phase out this ugly gdbarch_cannot_step_breakpoint hack
slowly.
> Ulrich, any idea why cannot_step_breakpoint was ever needed
> for the SPU?
>
> Thanks,
> Pedro Alves
--
Peter Schauer Peter.Schauer@mytum.de
next prev parent reply other threads:[~2015-04-02 9:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 14:52 Yao Qi
2015-03-20 17:48 ` Pedro Alves
2015-04-01 20:35 ` Peter Schauer
2015-04-02 8:58 ` Pedro Alves
2015-04-02 9:09 ` Peter Schauer [this message]
2015-04-02 9:38 ` Pedro Alves
2015-04-02 12:44 ` Yao Qi
2015-04-07 12:45 ` Ulrich Weigand
2015-04-08 15:06 ` Yao Qi
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=201504020909.t3299MbW015585@licht.localdomain \
--to=peterschauer@gmx.net \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=qiyaoltc@gmail.com \
--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