From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: pedro@codesourcery.com (Pedro Alves)
Cc: gdb-patches@sourceware.org,
julian@codesourcery.com (Julian Brown),
drow@false.org (Daniel Jacobowitz)
Subject: Re: [rfc] Fix PowerPC displaced stepping regression
Date: Mon, 28 Sep 2009 17:27:00 -0000 [thread overview]
Message-ID: <200909281727.n8SHR3oW016296@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <200909281757.49385.pedro@codesourcery.com> from "Pedro Alves" at Sep 28, 2009 05:57:48 PM
Pedro Alves wrote:
Sorry, I missed one additional point:
> So, displaced_step_prepare would propagate the "continue" vs
> "step" up, and all its callers would do the old logic:
>
> if (step)
> {
> if (gdbarch_software_single_step_p (gdbarch))
> target_resume (ptid, 0, TARGET_SIGNAL_0);
> else
> target_resume (ptid, 1, TARGET_SIGNAL_0);
> }
> else
> target_resume (ptid, 0, TARGET_SIGNAL_0);
>
> ... that is, we'd remove the checks for use_displaced_stepping from
> maybe_software_singlestep, and use something like the
> above in displaced_step_fixup, where we issue the target_resume
> (with `step' being what gdbarch_displaced_step_copy_insn reported
> it wanted).
Maybe I misunderstood your point here, but I don't think we can
actually do SW single-step on the displaced copy (using the normal
SW single-step mechanism). The way SW single-step ususally works
is to place breakpoints at all potential branch targets. But if
we have a displaced PC-relative branch, for example, the branch
target may not even point to addressable memory, so we cannot put
breakpoints there.
It seems best to never call maybe_software_single_step on displaced
copies, like my patch does. If the target wants to place breakpoint
instructions somewhere in there, it can do so during copy_insn.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2009-09-28 17:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-20 22:14 [PATCH] Displaced stepping (non-stop debugging) support for ARM Linux Julian Brown
2009-01-21 18:07 ` Pedro Alves
2009-02-02 20:01 ` Daniel Jacobowitz
2009-05-16 18:19 ` Julian Brown
2009-06-09 17:37 ` Daniel Jacobowitz
2009-06-10 14:58 ` Pedro Alves
2009-06-10 15:05 ` Daniel Jacobowitz
2009-07-15 19:16 ` Julian Brown
2009-07-24 2:17 ` Daniel Jacobowitz
2009-07-31 11:43 ` Julian Brown
2009-09-24 19:35 ` Ulrich Weigand
2009-09-27 21:47 ` [rfc] Fix PowerPC displaced stepping regression Ulrich Weigand
2009-09-28 16:57 ` Pedro Alves
2009-09-28 17:12 ` Ulrich Weigand
2009-09-28 17:31 ` Pedro Alves
2009-09-28 17:39 ` Ulrich Weigand
2009-09-28 17:27 ` Ulrich Weigand [this message]
2009-09-28 17:39 ` Pedro Alves
2009-09-28 17:45 ` Ulrich Weigand
2009-09-28 19:07 ` Pedro Alves
2009-09-28 19:41 ` Pedro Alves
2009-09-29 0:59 ` Ulrich Weigand
2009-09-29 1:36 ` Joel Brobecker
2009-09-29 12:54 ` 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=200909281727.n8SHR3oW016296@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=julian@codesourcery.com \
--cc=pedro@codesourcery.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