summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-07-29 08:14:45 +0000
committerEli Zaretskii <eliz@gnu.org>2001-07-29 08:14:45 +0000
commit22b089e625f66921a8199a117007c8c712519037 (patch)
tree210b736e4a82fdbd6e51719c8c32effa81f24067
parentb80d7c8eb8898f1dea2d6d78cd0f2003f2dc8a08 (diff)
downloadgdb-22b089e625f66921a8199a117007c8c712519037.tar.gz
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.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/NEWS2
-rw-r--r--gdb/config/i386/tm-go32.h16
3 files changed, 26 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ac8e0a1c1b6..741377a1387 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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>
* version.in: Bump version number to 5.0.90-cvs.
diff --git a/gdb/NEWS b/gdb/NEWS
index db1e486de70..edaf5e81b42 100644
--- 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
diff --git a/gdb/config/i386/tm-go32.h b/gdb/config/i386/tm-go32.h
index f416396a3f5..024f4fbe355 100644
--- a/gdb/config/i386/tm-go32.h
+++ b/gdb/config/i386/tm-go32.h
@@ -48,4 +48,20 @@
#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 */