Fix bug 297078 gdbserver signal handling problems caused by diff vki nr/gdb nr and
non reset of "C-ontinued" signal
* To allow vki signame to be used in debuglog:
- pub_core_signals.h : added prototype for Char *VG_(signame)
- m_signals.c : changed static const Char *signame(Int sigNo)
to const Char *VG_(signame)(Int sigNo)
* valgrind-low.c : when the signal to report to gdb has
been reported, clear it so that it is not reported anymore
afterwards.
* m_gdbserver.c: when checking in pass_signals if signal
can be passed without gdb interaction, do a conversion
from vki nr to gdb nr when indexing
(as pass_signals[] is indexed by gdb_nr).
* various gdbserver files:
- used vki_ prefix for some args and variables to clarify
- better debuglog tracing
* modified nlpasssigalrm.vgtest to test SIGCHLD signal
handling followed by a break (to see SIGTRAP is properly
given to gdb).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12470 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/gdbserver_tests/passsigalrm.c b/gdbserver_tests/passsigalrm.c
index a625eb6..6493a85 100644
--- a/gdbserver_tests/passsigalrm.c
+++ b/gdbserver_tests/passsigalrm.c
@@ -1,13 +1,16 @@
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
-static int sigalrm_received = 0;
+#include <stdlib.h>
+static int sigalrm_received = 0;
static void sigalrm_handler(int signr)
{
sigalrm_received++;
}
+static int breakme = 0;
+
int main (int argc, char *argv[])
{
struct sigaction sa;
@@ -36,5 +39,7 @@
fprintf (stderr, "wrong 2nd: unexpected value %d sigalrm_received\n",
sigalrm_received);
+ system("../tests/true");
+ breakme++;
return 0;
}