* config/i386/tm-linux.h: Add longjmp support.
authorMark Kettenis <kettenis@gnu.org>
Fri, 7 Jul 2000 00:30:35 +0000 (00:30 +0000)
committerMark Kettenis <kettenis@gnu.org>
Fri, 7 Jul 2000 00:30:35 +0000 (00:30 +0000)
(JB_ELEMENT_SIZE, JB_PC): New defines.
(GET_LONGJMP_TARGET): Define.
(get_longjmp_target): Add prototype.

gdb/ChangeLog
gdb/config/i386/tm-linux.h

index 82ebff9a4ac5cc8c6e15a1ee221b2c4c5452a68e..7a924632fce12fa8dae532b4ff7fa97a6b76007b 100644 (file)
@@ -1,5 +1,10 @@
 2000-07-07  Mark Kettenis  <kettenis@gnu.org>
 
+       * config/i386/tm-linux.h: Add longjmp support.
+       (JB_ELEMENT_SIZE, JB_PC): New defines.
+       (GET_LONGJMP_TARGET): Define.
+       (get_longjmp_target): Add prototype.
+
        * breakpoint.c (bpstat_what): Keep returning
        BPSTAT_WHAT_SET_LONGJMP_RESUME when hitting multiple longjmp()
        breakpoints instead of signalling an error by returning
index d6a4616620cffd4d91eb6641294ae0928daaeb2b..1572a303abf5172be99eea809dbde226fa09843d 100644 (file)
@@ -136,5 +136,22 @@ extern CORE_ADDR i386_linux_skip_solib_resolver (CORE_ADDR pc);
 /* N_FUN symbols in shared libaries have 0 for their values and need
    to be relocated. */
 #define SOFUN_ADDRESS_MAYBE_MISSING
+\f
+
+/* Support for longjmp.  */
+
+/* Details about jmp_buf.  It's supposed to be an array of integers.  */
+
+#define JB_ELEMENT_SIZE 4      /* Size of elements in jmp_buf.  */
+#define JB_PC          5       /* Array index of saved PC.  */
+
+/* Figure out where the longjmp will land.  Slurp the args out of the
+   stack.  We expect the first arg to be a pointer to the jmp_buf
+   structure from which we extract the pc (JB_PC) that we will land
+   at.  The pc is copied into ADDR.  This routine returns true on
+   success.  */
+
+#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
+extern int get_longjmp_target (CORE_ADDR *addr);
 
 #endif /* #ifndef TM_LINUX_H */
This page took 0.031736 seconds and 4 git commands to generate.