From: Luis Gustavo <luis_gustavo@mentor.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix displaced stepping for remote targets
Date: Mon, 09 Apr 2012 15:10:00 -0000 [thread overview]
Message-ID: <4F82FBA1.8070402@mentor.com> (raw)
In-Reply-To: <4F827785.2030207@codesourcery.com>
On 04/09/2012 02:45 AM, Yao Qi wrote:
> On 03/21/2012 04:33 AM, Luis Gustavo wrote:
>> If a target can't use hw single-stepping to execute instructions in the
>> scratch pad, i think it should disallow it by returning 0 in
>> gdbarch_displaced_step_hw_singlestep. Does it make sense?
>
> Yes, that is what gdbarch_displaced_step_hw_singlestep for, AFAIK. I am
> sorry I don't understand how gdbarch_displaced_step_hw_singlestep
> related to your patch here.
>
It is not directly related. I raised that one based on your comment
about some targets not being able to HW single-step a group of
instructions in the scratch pad. In that case, they should report 0 for
gdbarch_displaced_step_hw_singlestep.
My target reports 1 for gdbarch_displaced_step_hw_singlestep, and thus
HW single-stepping should be used when doing displaced stepping.
The patch addresses a different problem, namely the overriding of the
STEP variable's value (originally containing
gdbarch_displaced_step_hw_singlestep ()'s result) with this call...
if (step && breakpoint_inserted_here_p (aspace, pc))
step = 0;
If we are trying to step-over a breakpoint using displaced stepping,
breakpoint_inserted_here_p (aspace, pc) will obviously return true, thus
we disable stepping by setting it to 0. This looks wrong.
This has the effect of issuing a vCont;c packet to the remote target
instead of vCont;s.
By changing the order of the statements in the code, we address this in,
hopefully, the correct way. Unless there is some magic going on there.
Regards,
Luis
next prev parent reply other threads:[~2012-04-09 15:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 2:03 Luis Gustavo
2012-03-20 4:35 ` Yao Qi
2012-03-20 4:39 ` Luis Gustavo
2012-03-20 6:53 ` Yao Qi
2012-03-20 20:34 ` Luis Gustavo
2012-04-09 5:46 ` Yao Qi
2012-04-09 15:10 ` Luis Gustavo [this message]
2012-03-29 15:26 ` Luis Gustavo
2012-04-13 18:16 ` Pedro Alves
2012-04-13 19:54 ` Luis Gustavo
2012-04-13 20:27 ` Pedro Alves
2012-04-13 21:26 ` Luis Gustavo
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=4F82FBA1.8070402@mentor.com \
--to=luis_gustavo@mentor.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@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