diff options
author | David Taylor <taylor@redhat.com> | 1998-01-05 15:36:49 +0000 |
---|---|---|
committer | David Taylor <taylor@redhat.com> | 1998-01-05 15:36:49 +0000 |
commit | 4b65fd38798807a481eb9c915af10bc36db0adc6 (patch) | |
tree | b563a8876cbed08d2aa19fa20eb24daf572877c8 /gdb/top.h | |
parent | f6428b86cccb6a2aa2fc3b9d659fedc5200b1047 (diff) | |
download | gdb-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.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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 *)); |