Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jerome Guitton <guitton@adacore.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Support for x86 on-stack trampolines
Date: Wed, 04 May 2011 15:17:00 -0000	[thread overview]
Message-ID: <20110504151723.GB64873@adacore.com> (raw)
In-Reply-To: <201105041020.p44AKGt2025840@glazunov.sibelius.xs4all.nl>

Mark Kettenis (mark.kettenis@xs4all.nl):

> Hmm, I think the new name for i386_match_insn is confusing.  Also, it
> isn't really necessary to change its prototype.  It returns a pointer
> to the matched pattern, so some trivial pointer arithmetic will give
> you the index into the array of patterns.

OK, I don't mind pointer arithmetics. I'm not sure about the name; I haven't
much imagination for names, I must say. Any suggestion?

The thing that I would like to make clear is that this new function is
different from i386_find_insn: it only checks one instruction
pattern. It is used by both i386_find_insn (which tries to match one
instruction against any pattern in a set) and by i386_match_insn_block
(which checks that a given PC points inside a block of instruction
matching an ordered list of patterns).


> Is checking the instructions before checking the name the most
> efficient way of doing this?

I guess that it depends (big symbol tables vs low connection to
target).  In any case, to be consistent with the other sniffers, I
should probably check the name first.

Otherwise, I have taken the rest of your comments into account; and I
will send an updated patch as soon as we have some proper name for
i386_match_insn. Thank you for your review!



  reply	other threads:[~2011-05-04 15:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04  0:21 Jerome Guitton
2011-05-04  8:55 ` Pedro Alves
2011-05-04 14:52   ` Jerome Guitton
2011-05-04 10:20 ` Mark Kettenis
2011-05-04 15:17   ` Jerome Guitton [this message]
2011-05-04 15:31     ` Mark Kettenis
2011-05-05 15:10       ` Jerome Guitton
2011-05-05 15:18         ` Mark Kettenis
2011-05-05 16:03           ` Jerome Guitton

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=20110504151723.GB64873@adacore.com \
    --to=guitton@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /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