From: Ulrich Weigand Date: Thu, 20 May 2004 14:58:54 +0000 (+0000) Subject: * gdb.base/signull.c: Use sigsetjmp/siglongjmp instead of X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=725603e12fe543cba35225e17d69a0c9450beeb4;p=binutils-gdb.git * gdb.base/signull.c: Use sigsetjmp/siglongjmp instead of setjmp/longjmp. Use sigaction instead of signal. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9d528417a84..8a82c339ba2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-05-20 Ulrich Weigand + + * gdb.base/signull.c: Use sigsetjmp/siglongjmp instead of + setjmp/longjmp. Use sigaction instead of signal. + 2004-05-19 J. Brobecker Michael Snyder diff --git a/gdb/testsuite/gdb.base/signull.c b/gdb/testsuite/gdb.base/signull.c index 266a7dcb6c8..6c9ad8532d5 100644 --- a/gdb/testsuite/gdb.base/signull.c +++ b/gdb/testsuite/gdb.base/signull.c @@ -19,6 +19,7 @@ #include #include +#include enum tests { code_entry_point, code_descriptor, data_pointer @@ -38,7 +39,7 @@ jmp_buf env; extern void keeper (int sig) { - longjmp (env, 0); + siglongjmp (env, 0); } extern long @@ -59,10 +60,15 @@ int main () { static volatile int i; - signal (SIGSEGV, keeper); + + struct sigaction act; + memset (&act, 0, sizeof act); + act.sa_handler = keeper; + sigaction (SIGSEGV, &act, NULL); + for (i = 0; i < 10; i++) { - setjmp (env); + sigsetjmp (env, 1); bowler (); } }