Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: cagney@gnu.org
Cc: gdb-patches@sources.redhat.com
Subject: Signal Trampoline Frames
Date: Wed, 24 Mar 2004 23:03:00 -0000	[thread overview]
Message-ID: <200403242303.i2ON33uL005973@elgar.kettenis.dyndns.org> (raw)

Andrew,

It's probably too late now, but I have the feeling this new
tramp-frame.c is not generic enough.  It assumes fixed-length
instructions (which makes it unsuitable for IA-32 and AMD64) and uses
the arbitrary number 8 for the number of instructions (which makes it
not quite suitable for SPARC).  The whole thing seems a bit
over-engineered to me :-(.

Anyway, you might want to conseider the attached patch, which makes
the comments catch up with reality.  The extra whitespace is there to
guide the eye and make the distinction between the instruction
sequence members and the initialization function clear.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* tramp-frame.h (struct tramp_frame): Fix comments.

Index: tramp-frame.h
===================================================================
RCS file: /cvs/src/src/gdb/tramp-frame.h,v
retrieving revision 1.2
diff -u -p -r1.2 tramp-frame.h
--- tramp-frame.h 23 Mar 2004 14:12:30 -0000 1.2
+++ tramp-frame.h 24 Mar 2004 22:51:03 -0000
@@ -43,15 +43,16 @@ struct tramp_frame
 {
   /* The trampoline's entire instruction sequence.  Search for this in
      the inferior at or around the frame's PC.  It is assumed that the
-     PC is INSN_SIZE aligned, and that each element of TRAMP contains
-     one INSN_SIZE instruction.  It is also assumed that TRAMP[0]
+     PC is INSN_SIZE aligned, and that each element of INSN contains
+     one INSN_SIZE instruction.  It is also assumed that INSN[0]
      contains the first instruction of the trampoline and hence the
-     address of the instruction matching TRAMP[0] is the trampoline's
+     address of the instruction matching INSN[0] is the trampoline's
      "func" address.  */
   int insn_size;
   ULONGEST insn[8];
+
   /* Initialize a trad-frame cache corresponding to the tramp-frame.
-     FUNC is the address of the instruction TRAMP[0] in memory.  */
+     FUNC is the address of the instruction INSN[0] in memory.  */
   void (*init) (const struct tramp_frame *self,
 		struct frame_info *next_frame,
 		struct trad_frame_cache *this_cache,


             reply	other threads:[~2004-03-24 23:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-24 23:03 Mark Kettenis [this message]
2004-03-25  0:26 ` Andrew Cagney
2004-03-25 10:26   ` Mark Kettenis
2004-03-25 14:42     ` 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=200403242303.i2ON33uL005973@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --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