Support for stepping through longjmp in DJGPP programs:
authorEli Zaretskii <eliz@gnu.org>
Sun, 29 Jul 2001 08:03:36 +0000 (08:03 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 29 Jul 2001 08:03:36 +0000 (08:03 +0000)
* config/i386/tm-go32.h (JB_ELEMENT_SIZE, JB_PC): New macros.
(GET_LONGJMP_TARGET): Define to call get_longjmp_target.
(get_longjmp_target): Add prototype.

gdb/ChangeLog
gdb/NEWS
gdb/config/i386/tm-go32.h

index 9bda34e86704d2ea07c51dfb7752c0916763a0ae..0c59dbe3468e42c5ce8c866277821bd373923adf 100644 (file)
@@ -1,3 +1,11 @@
+2001-07-29  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       Support for stepping through longjmp in DJGPP programs:
+
+       * config/i386/tm-go32.h (JB_ELEMENT_SIZE, JB_PC): New macros.
+       (GET_LONGJMP_TARGET): Define to call get_longjmp_target.
+       (get_longjmp_target): Add prototype.
+
 2001-07-28  Andrew Cagney  <ac131313@redhat.com>
 
        Fix some PID/TPID fallout for HP/UX.
index db1e486de70594efc7053f6d97f850365bb852a7..edaf5e81b426a7d7ed8c46a7bec885233e0ebf5c 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -165,6 +165,8 @@ which is part of the DJGPP development kit).
 
 DWARF2 debug info is now supported.
 
+It is now possible to `step' and `next' through calls to `longjmp'.
+
 * Changes in documentation.
 
 All GDB documentation was converted to GFDL, the GNU Free
index f416396a3f582d38524fd4a23a56c67804d24c83..024f4fbe355e6e4817c9872dfe35cd83600bceaa 100644 (file)
 #undef  FRAME_SAVED_PC
 #define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
 
+/* 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          8       /* Array index of saved PC inside jmp_buf.  */
+
+/* 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 /* TM_GO32_H */
This page took 0.028874 seconds and 4 git commands to generate.