Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Multi-arch SIGTRAMP_{START|END} for FreeBSD/i386
@ 2002-09-06 13:47 Mark Kettenis
  2002-09-06 14:32 ` Jason R Thorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Kettenis @ 2002-09-06 13:47 UTC (permalink / raw)
  To: gdb-patches, thorpej

This removes the last #defines from i386/tm-fbsd.h.  Yippie!

Jason, just to be safe, I reset sigtramp_start and sigtramp_end on
NetBSD.  I added a FIXME too, but the obvious implementation of
sigtramp_start using i386nbsd_sigtramp_offset is probably not going to
work, since then very weird things happen to libc-provided signal
trampolines.  I need to think about that a bit more (Linux suffers
from a similar problem).

Mark

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

	* i386bsd-tdep.c (i386bsd_init_abi): Set sigtramp_start and
	sigtramp_end to i386bsd_sigtramp_start and i386bsd_sigtramp_end.
	* i386nbsd-tdep.c (i386nbsd_init_abi): Set sigtramp_start and
	sigtramp_end to NULL.
	* config/i386/tm-fbsd.h (SIGTRAMP_START, SIGTRAMP_END): Remove
	defines.
	(i386bsd_sigtramp_start, i386_sigtramp_end): Remove prototypes.

Index: i386bsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386bsd-tdep.c,v
retrieving revision 1.9
diff -u -p -r1.9 i386bsd-tdep.c
--- i386bsd-tdep.c 1 Sep 2002 23:24:19 -0000 1.9
+++ i386bsd-tdep.c 6 Sep 2002 20:37:21 -0000
@@ -100,6 +100,10 @@ i386bsd_init_abi (struct gdbarch_info in
 
   set_gdbarch_pc_in_sigtramp (gdbarch, i386bsd_pc_in_sigtramp);
 
+  /* Allow the recognition of sigtramps as a function named <sigtramp>.  */
+  set_gdbarch_sigtramp_start (gdbarch, i386bsd_sigtramp_start);
+  set_gdbarch_sigtramp_end (gdbarch, i386bsd_sigtramp_end);
+
   /* Assume SunOS-style shared libraries.  */
   set_gdbarch_in_solib_call_trampoline (gdbarch,
 					i386bsd_aout_in_solib_call_trampoline);
Index: i386nbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386nbsd-tdep.c,v
retrieving revision 1.10
diff -u -p -r1.10 i386nbsd-tdep.c
--- i386nbsd-tdep.c 6 Sep 2002 20:28:57 -0000 1.10
+++ i386nbsd-tdep.c 6 Sep 2002 20:37:21 -0000
@@ -251,6 +251,11 @@ i386nbsd_init_abi (struct gdbarch_info i
 
   /* NetBSD has different signal trampoline conventions.  */
   set_gdbarch_pc_in_sigtramp (gdbarch, i386nbsd_pc_in_sigtramp);
+  /* FIXME: kettenis/20020906: We should probably provide
+     NetBSD-specific versions of these functions if we want to
+     recognize signal trampolines that live on the stack.  */
+  set_gdbarch_sigtramp_start (gdbarch, NULL);
+  set_gdbarch_sigtramp_end (gdbarch, NULL);
 
   /* NetBSD uses -freg-struct-return by default.  */
   tdep->struct_return = reg_struct_return;
Index: config/i386/tm-fbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-fbsd.h,v
retrieving revision 1.9
diff -u -p -r1.9 tm-fbsd.h
--- config/i386/tm-fbsd.h 30 Jun 2002 14:43:24 -0000 1.9
+++ config/i386/tm-fbsd.h 6 Sep 2002 20:37:21 -0000
@@ -27,16 +27,4 @@
 #include <sys/param.h>
 #endif
 
-/* These defines allow the recognition of sigtramps as a function name
-   <sigtramp>.
-
-   FIXME: kettenis/2002-05-12: Of course these defines will have to go
-   if we go truly "multi-arch", but I don't know yet how to get rid of
-   them.  */
-
-#define SIGTRAMP_START(pc) i386bsd_sigtramp_start (pc)
-#define SIGTRAMP_END(pc) i386bsd_sigtramp_end (pc)
-extern CORE_ADDR i386bsd_sigtramp_start (CORE_ADDR pc);
-extern CORE_ADDR i386bsd_sigtramp_end (CORE_ADDR pc);
-
 #endif /* TM_FBSD_H */


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

* Re: [PATCH] Multi-arch SIGTRAMP_{START|END} for FreeBSD/i386
  2002-09-06 13:47 [PATCH] Multi-arch SIGTRAMP_{START|END} for FreeBSD/i386 Mark Kettenis
@ 2002-09-06 14:32 ` Jason R Thorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason R Thorpe @ 2002-09-06 14:32 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

On Fri, Sep 06, 2002 at 10:47:11PM +0200, Mark Kettenis wrote:

 > This removes the last #defines from i386/tm-fbsd.h.  Yippie!

Cool!  I can nuke i386/tm-nbsd.h once the solib stuff is multi-arch'd,
too... man, that'll be nice...

 > Jason, just to be safe, I reset sigtramp_start and sigtramp_end on
 > NetBSD.  I added a FIXME too, but the obvious implementation of
 > sigtramp_start using i386nbsd_sigtramp_offset is probably not going to
 > work, since then very weird things happen to libc-provided signal
 > trampolines.  I need to think about that a bit more (Linux suffers
 > from a similar problem).

Yah... FWIW, gdb already notices signal trampolines on the stack,
but just says <signal handler called>, rather than <sigtramp> (which
is just fine with me, FWIW :-)

I'm super-busy next week (Intel Developer Forum), but I'll have
time to think/talk about it some more after that...

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>


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

end of thread, other threads:[~2002-09-06 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-06 13:47 [PATCH] Multi-arch SIGTRAMP_{START|END} for FreeBSD/i386 Mark Kettenis
2002-09-06 14:32 ` Jason R Thorpe

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