From: Eli Zaretskii <eliz@is.elta.co.il>
To: gdb-patches@sourceware.cygnus.com
Subject: [PATCH] Add support for stepping through longjmp to DJGPP
Date: Sun, 29 Jul 2001 03:10:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.91.1010729130929.2410C-100000@is> (raw)
FYI, I've commited the attached (trunk and branch), which makes the DJGPP
port support step and next through longjmp.
2001-07-27 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.
--- gdb/config/i386/tm-go32.h~0 Mon Apr 3 17:24:16 2000
+++ gdb/config/i386/tm-go32.h Fri Jul 27 21:41:26 2001
@@ -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 */
reply other threads:[~2001-07-29 3:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.SUN.3.91.1010729130929.2410C-100000@is \
--to=eliz@is.elta.co.il \
--cc=gdb-patches@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox