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: Tue, 20 Mar 2012 04:39:00 -0000 [thread overview]
Message-ID: <4F6809DB.1010005@mentor.com> (raw)
In-Reply-To: <4F6808C9.7020709@codesourcery.com>
On 03/20/2012 01:34 AM, Yao Qi wrote:
> On 03/20/2012 10:02 AM, Luis Gustavo wrote:
>> If a target supports hw single-stepping for displaced stepping, GDB
>> should just send a vCont;s packet to tell the target to step a single
>> instruction. In my case, GDB was always sending a vCont;c instead.
>
> On some arch, the original instruction may be translated to more than
> one instructions, and copied to scratch pad. So, we can't do
> single-step in scratch pad.
During a few tests x86 seems to do single-stepping in the scratch pad
when using displaced stepping, or at least it sends the correct vCont;s
packet.
>
> Even the case that one instruction is generated/copied to scratch pad
> can be optimized in your approach, but not sure it breaks
> software-single-step arch or not.
>
In my case GDB thinks there's a breakpoint right at PC since PC points
to the old location. GDB just continues through vCont;c. This does not
work as execution will just re-start from the scratch pad area and will
cause unpredictable behavior.
Maybe we need a better mechanism for this then.
Luis
next prev parent reply other threads:[~2012-03-20 4:39 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 [this message]
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
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=4F6809DB.1010005@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