Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Signal Trampoline Frames
@ 2004-03-24 23:03 Mark Kettenis
  2004-03-25  0:26 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2004-03-24 23:03 UTC (permalink / raw)
  To: cagney; +Cc: gdb-patches

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,


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-25 14:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-24 23:03 Signal Trampoline Frames Mark Kettenis
2004-03-25  0:26 ` Andrew Cagney
2004-03-25 10:26   ` Mark Kettenis
2004-03-25 14:42     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox