From: Pedro Alves <pedro@codesourcery.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org, msnyder@vmware.com,
jan.kratochvil@redhat.com
Subject: Re: [RFA] i386-tdep.c, check target_read_memory for error.
Date: Tue, 08 Mar 2011 19:50:00 -0000 [thread overview]
Message-ID: <201103081939.38165.pedro@codesourcery.com> (raw)
In-Reply-To: <201103081925.p28JPKb4008277@glazunov.sibelius.xs4all.nl>
On Tuesday 08 March 2011 19:25:20, Mark Kettenis wrote:
> > From: Pedro Alves <pedro@codesourcery.com>
> > Date: Tue, 8 Mar 2011 18:58:43 +0000
> >
> > On Tuesday 08 March 2011 18:37:55, Michael Snyder wrote:
> > > @@ -1221,7 +1231,8 @@ i386_skip_noop (CORE_ADDR pc)
> > > if (op == 0x90)
> > > {
> > > pc += 1;
> > > - target_read_memory (pc, &op, 1);
> > > + if (target_read_memory (pc, &op, 1))
> > > + return pc;
> >
> > I think you're meant to return PC as it was at function
> > start. Note the pc += 1 above. There are other instances
> > in the patch.
>
> Those are actually fine. Skipping nop instructions is harmless, even
> if we get stuck somewhere in the middle.
You're right, missed that.
BTW, I noticed a bunch of read_memory_unsigned_integer/read_memory_integer
calls in these skippers/sniffers. These functions call read_memory, which
throws.
--
Pedro Alves
next prev parent reply other threads:[~2011-03-08 19:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 21:38 Michael Snyder
2011-03-06 14:56 ` Jan Kratochvil
2011-03-06 17:00 ` Mark Kettenis
2011-03-06 22:34 ` Michael Snyder
2011-03-08 2:35 ` Mark Kettenis
2011-03-08 18:47 ` Michael Snyder
2011-03-08 18:59 ` Mark Kettenis
2011-03-08 19:27 ` Pedro Alves
2011-03-08 19:41 ` Mark Kettenis
2011-03-08 19:50 ` Pedro Alves [this message]
2011-03-09 1:32 ` Michael Snyder
2011-03-06 18:48 ` Michael Snyder
2011-03-06 19:00 ` Jan Kratochvil
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=201103081939.38165.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=mark.kettenis@xs4all.nl \
--cc=msnyder@vmware.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