2011-06-20 Yao Qi gdb/testsuite/ * gdb.base/savedregs.c (thrower): Remove write to address zero. (main): Install handler to SIGALRM instead of SIGSEGV. * gdb.base/savedregs.exp: Sleep for a while to make signal is delivered. diff --git a/gdb/testsuite/gdb.base/savedregs.c b/gdb/testsuite/gdb.base/savedregs.c index 9c4ce87..0a804cd 100644 --- a/gdb/testsuite/gdb.base/savedregs.c +++ b/gdb/testsuite/gdb.base/savedregs.c @@ -45,11 +45,11 @@ catcher (int sig) static void thrower (void) { - *(char *)0 = 0; } main () { - signal (SIGSEGV, catcher); + signal (SIGALRM, catcher); + alarm (1); thrower (); } diff --git a/gdb/testsuite/gdb.base/savedregs.exp b/gdb/testsuite/gdb.base/savedregs.exp index 6434512..0de0db8 100644 --- a/gdb/testsuite/gdb.base/savedregs.exp +++ b/gdb/testsuite/gdb.base/savedregs.exp @@ -142,7 +142,7 @@ process_saved_regs thrower { main } { } # Continue to the signal catcher, check main's saved-reg info, capture # catcher's saved-reg info. -gdb_test "handle SIGSEGV pass print nostop" +sleep 2 gdb_test "advance catcher" "catcher .* at .*" process_saved_regs catcher { sigtramp thrower } { main }