aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2013-12-03 04:29:02 -0800
committerJose E. Marchesi <jose.marchesi@oracle.com>2013-12-03 04:34:48 -0800
commitf13003005660fb79e34c5b3aed0dffd0af5ad542 (patch)
treee67cb2bb4fdd21bfcb5608b76cf3ead6bf0dd345 /gdb
parent7fb1b8b13f1fb3a72f0ab3ce72967549ea040e17 (diff)
downloadgdb-f13003005660fb79e34c5b3aed0dffd0af5ad542.zip
gdb-f13003005660fb79e34c5b3aed0dffd0af5ad542.tar.gz
gdb-f13003005660fb79e34c5b3aed0dffd0af5ad542.tar.bz2
testsuite: handle SIGLOST/SIGPWR conflict in sparc64-*-linux-gnu targets.
2013-10-03 Jose E. Marchesi <jose.marchesi@oracle.com> * gdb.base/sigall.exp (test_one_sig): gdb identifies SIGLOST as a SIGPWR in sparc64. * gdb.base/sigall.c (main): In some targets SIGLOST and SIGPWR have the same signal number. Handle this situation.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog8
-rw-r--r--gdb/testsuite/gdb.base/sigall.c4
-rw-r--r--gdb/testsuite/gdb.base/sigall.exp12
3 files changed, 20 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5725b3d..44c6f76 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2013-10-03 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * gdb.base/sigall.exp (test_one_sig): gdb identifies SIGLOST as a
+ SIGPWR in sparc64.
+
+ * gdb.base/sigall.c (main): In some targets SIGLOST and SIGPWR
+ have the same signal number. Handle this situation.
+
2013-12-03 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/dot_all: New testcase.
diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c
index 110029d..68f3ecb 100644
--- a/gdb/testsuite/gdb.base/sigall.c
+++ b/gdb/testsuite/gdb.base/sigall.c
@@ -1083,7 +1083,7 @@ return 0;
int
gen_PWR ()
{
-#ifdef SIGPWR
+#if defined(SIGPWR) && (!defined (SIGLOST) || SIGPWR != SIGLOST)
kill (getpid (), SIGPWR);
#else
handle_PWR (0);
@@ -1662,7 +1662,7 @@ main ()
#ifdef SIGUSR2
signal (SIGUSR2, handle_USR2);
#endif
-#ifdef SIGPWR
+#if defined(SIGPWR) && (!defined (SIGLOST) || SIGPWR != SIGLOST)
signal (SIGPWR, handle_PWR);
#endif
#if defined (SIGPOLL) && (!defined (SIGIO) || SIGPOLL != SIGIO)
diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp
index b1b8597..d531479 100644
--- a/gdb/testsuite/gdb.base/sigall.exp
+++ b/gdb/testsuite/gdb.base/sigall.exp
@@ -39,12 +39,20 @@ proc test_one_sig {nextsig} {
set need_another_continue 1
set missed_handler 0
if $this_sig_supported then {
+ set esig $thissig
+
if { $thissig == "IO" } {
setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu"
}
+ # On Linux SPARC64 systems SIGLOST==SIGPWR and gdb identifies
+ # the raised signal as PWR.
+ if { $thissig == "LOST" && [ istarget "sparc64-*-linux*" ] } then {
+ set esig "PWR"
+ }
+
gdb_test "continue" \
- "Continuing.*Program received signal SIG$thissig.*" \
- "get signal $thissig"
+ "Continuing.*Program received signal SIG$esig.*" \
+ "get signal $esig"
}
if [ istarget "alpha-dec-osf3*" ] then {
# OSF/1-3.x is unable to continue with a job control stop signal.