Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: gdb/testsuite/gdb.threads/stepi-random-signal.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.threads/staticthreads.exp ('k') | gdb/testsuite/gdb.threads/stepi-random-signal.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.threads/stepi-random-signal.c
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.c b/gdb/testsuite/gdb.threads/stepi-random-signal.c
similarity index 66%
copy from gdb/testsuite/gdb.multi/watchpoint-multi.c
copy to gdb/testsuite/gdb.threads/stepi-random-signal.c
index 51697b0b3e34a1dc7725c281b247de4bb49575b5..2aec7f1bedfc9a7f615194567a60f29308b9e87a 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.c
+++ b/gdb/testsuite/gdb.threads/stepi-random-signal.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2012 Free Software Foundation, Inc.
+ Copyright 2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,36 +16,33 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <pthread.h>
-#include <assert.h>
+#include <signal.h>
+#include <unistd.h>
-static volatile int a, b, c;
-
-static void
-marker_exit (void)
-{
- a = 1;
-}
+static pthread_t main_thread;
static void *
start (void *arg)
{
- b = 2;
- c = 3;
+ /* A signal whose default action is ignore. */
+ pthread_kill (main_thread, SIGCHLD);
+ while (1)
+ sleep (1); /* set break here */
return NULL;
}
int
main (void)
{
+ unsigned int counter = 1;
pthread_t thread;
- int i;
- i = pthread_create (&thread, NULL, start, NULL);
- assert (i == 0);
- i = pthread_join (thread, NULL);
- assert (i == 0);
+ main_thread = pthread_self ();
+ pthread_create (&thread, NULL, start, NULL);
+
+ while (counter != 0)
+ counter++; /* set break 2 here */
- marker_exit ();
return 0;
}
« no previous file with comments | « gdb/testsuite/gdb.threads/staticthreads.exp ('k') | gdb/testsuite/gdb.threads/stepi-random-signal.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698