diff options
author | Pedro Alves <palves@redhat.com> | 2014-03-20 14:09:53 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-03-20 14:09:53 +0000 |
commit | 40acf43aadb4d5348cff0dd554ae97de4dd775af (patch) | |
tree | 09974f15b14120df576e19c6efa619504542dbd0 /gdb/testsuite | |
parent | 9f5e1e021a843e573b72ee448397a4db139adf2e (diff) | |
download | gdb-40acf43aadb4d5348cff0dd554ae97de4dd775af.zip gdb-40acf43aadb4d5348cff0dd554ae97de4dd775af.tar.gz gdb-40acf43aadb4d5348cff0dd554ae97de4dd775af.tar.bz2 |
Further cleanup of signal-while-stepping-over-bp-other-thread.c.
This test now uses pthread_kill instead of the host's kill command, so
no longer need to block signals, or store the the inferior's PID.
gdb/testsuite/
2014-03-20 Pedro Alves <palves@redhat.com>
* gdb.threads/signal-while-stepping-over-bp-other-thread.c (pid):
Delete.
(block_signals, unblock_signals): Delete.
(child_function_2, main): Remove references to deleted variable
and functions.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c | 29 |
2 files changed, 8 insertions, 29 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bc6d6df..31e0e5d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,13 @@ 2014-03-20 Pedro Alves <palves@redhat.com> + * gdb.threads/signal-while-stepping-over-bp-other-thread.c (pid): + Delete. + (block_signals, unblock_signals): Delete. + (child_function_2, main): Remove references to deleted variable + and functions. + +2014-03-20 Pedro Alves <palves@redhat.com> + * gdb.threads/signal-while-stepping-over-bp-other-thread.c (main): Use pthread_kill to signal thread 2. * gdb.threads/signal-while-stepping-over-bp-other-thread.exp: diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c index 8839a6f..0f3d17a 100644 --- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c +++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c @@ -22,7 +22,6 @@ unsigned int args[2]; -pid_t pid; pthread_barrier_t barrier; pthread_t child_thread_2, child_thread_3; @@ -38,24 +37,6 @@ callme (void) { } -void -block_signals (void) -{ - sigset_t mask; - - sigfillset (&mask); - sigprocmask (SIG_BLOCK, &mask, NULL); -} - -void -unblock_signals (void) -{ - sigset_t mask; - - sigfillset (&mask); - sigprocmask (SIG_UNBLOCK, &mask, NULL); -} - void * child_function_3 (void *arg) { @@ -79,8 +60,6 @@ child_function_2 (void *arg) int my_number = (long) arg; volatile int *myp = (int *) &args[my_number]; - unblock_signals (); - pthread_barrier_wait (&barrier); while (*myp > 0) @@ -106,10 +85,6 @@ main () int res; long i; - /* Block signals in all threads but one, so that we're sure which - thread gets the signal we send from the command line. */ - block_signals (); - signal (SIGUSR1, handler); /* Call these early so that PLTs for these are resolved soon, @@ -120,10 +95,6 @@ main () pthread_barrier_init (&barrier, NULL, 2); - /* The test uses this global to know where to send the signal - to. */ - pid = getpid (); - i = 0; args[i] = 1; res = pthread_create (&child_thread_2, |