aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.h
diff options
context:
space:
mode:
authorDavid Taylor <taylor@redhat.com>1998-01-05 15:36:49 +0000
committerDavid Taylor <taylor@redhat.com>1998-01-05 15:36:49 +0000
commit4b65fd38798807a481eb9c915af10bc36db0adc6 (patch)
treeb563a8876cbed08d2aa19fa20eb24daf572877c8 /gdb/top.h
parentf6428b86cccb6a2aa2fc3b9d659fedc5200b1047 (diff)
downloadgdb-4b65fd38798807a481eb9c915af10bc36db0adc6.zip
gdb-4b65fd38798807a481eb9c915af10bc36db0adc6.tar.gz
gdb-4b65fd38798807a481eb9c915af10bc36db0adc6.tar.bz2
fix gdb/13620 -- control-c to interrupt gdb command only works once.
if HAVE_SIGSETJMP is not defined, nothing is changed; if it is defined (as it now is for sysv4 based systems), then the fix is enabled.
Diffstat (limited to 'gdb/top.h')
-rw-r--r--gdb/top.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/top.h b/gdb/top.h
index f60d926..c85b323 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -29,8 +29,18 @@ extern char gdbinit[];
/* Generally one should use catch_errors rather than manipulating these
directly. The exception is main(). */
-extern jmp_buf error_return;
-extern jmp_buf quit_return;
+#if defined(HAVE_SIGSETJMP)
+#define SIGJMP_BUF sigjmp_buf
+#define SIGSETJMP(buf) sigsetjmp(buf, 1)
+#define SIGLONGJMP(buf,val) siglongjmp(buf,val)
+#else
+#define SIGJMP_BUF jmp_buf
+#define SIGSETJMP(buf) setjmp(buf)
+#define SIGLONGJMP(buf,val) longjmp(buf,val)
+#endif
+
+extern SIGJMP_BUF error_return;
+extern SIGJMP_BUF quit_return;
extern void print_gdb_version PARAMS ((GDB_FILE *));