From: Daniel Jacobowitz <drow@false.org>
To: Andrew Cagney <cagney@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] signal trampoline frames
Date: Wed, 24 Mar 2004 17:15:00 -0000 [thread overview]
Message-ID: <20040324171547.GA17526@nevyn.them.org> (raw)
In-Reply-To: <4060D025.6070601@gnu.org>
On Tue, Mar 23, 2004 at 07:02:45PM -0500, Andrew Cagney wrote:
> see attached?
>
> >
> >>>+static CORE_ADDR
> >>>+tramp_frame_start (CORE_ADDR pc, const struct tramp_frame *tramp)
> >>>+{
> >>>+ int ti;
> >>>+ /* Search through the trampoline for one that matches the
> >>>+ instruction sequence around PC. */
> >>>+ for (ti = 0; tramp->insn[ti] != 0; ti++)
> >>>+ {
> >>>+ CORE_ADDR func = pc - tramp->insn_size * ti;
> >>>+ int i;
> >>>+ for (i = 0; 1; i++)
> >>>+ {
> >>>+ bfd_byte buf[sizeof (LONGEST)];
> >>>+ CORE_ADDR insn;
> >
> >
> >tramp->insn is a ULONGEST. Both of these should probably be ULONGEST
> >also.
>
> changed to ->insn[0]
I was more concerned about the CORE_ADDR.
> >>>+ if (tramp->insn[i] == 0)
> >>>+ return func;
> >
> >
> >So zeros in tramp->insn mark the end of the sequence? Should document
> >that, zeros are valid instructions and some bizarre architecture might
> >use one as a syscall trap.
>
> Added TRAMP_SENTINEL_INSN, it _isn't_ zero.
The comment in the attached still says it's zero. Zero and -1 are just
about equally likely/unlikely, so I don't think it matters what the
value is; I like having TRAMP_SENTINEL_INSN though.
> I don't know.
Doesn't much matter then.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-03-24 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-22 3:14 Andrew Cagney
2004-03-23 14:13 ` Andrew Cagney
2004-03-23 23:09 ` Daniel Jacobowitz
2004-03-24 0:02 ` Andrew Cagney
2004-03-24 17:15 ` Daniel Jacobowitz [this message]
2004-03-24 23:18 ` Andrew Cagney
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=20040324171547.GA17526@nevyn.them.org \
--to=drow@false.org \
--cc=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.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