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

Unified Diff: gdb/testsuite/gdb.multi/watchpoint-multi.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 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.multi/bkpt-multi-exec.exp ('k') | gdb/testsuite/gdb.multi/watchpoint-multi.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.multi/watchpoint-multi.c
diff --git a/gdb/testsuite/gdb.threads/leader-exit.c b/gdb/testsuite/gdb.multi/watchpoint-multi.c
similarity index 72%
copy from gdb/testsuite/gdb.threads/leader-exit.c
copy to gdb/testsuite/gdb.multi/watchpoint-multi.c
index fb97a6cd5eed882ebf65a935c89eb338325cf1d6..51697b0b3e34a1dc7725c281b247de4bb49575b5 100644
--- a/gdb/testsuite/gdb.threads/leader-exit.c
+++ b/gdb/testsuite/gdb.multi/watchpoint-multi.c
@@ -1,6 +1,6 @@
-/* Clean exit of the thread group leader should not break GDB.
+/* This testcase is part of GDB, the GNU debugger.
- Copyright 2007, 2011-2012 Free Software Foundation, Inc.
+ Copyright 2012 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
@@ -17,19 +17,22 @@
#include <pthread.h>
#include <assert.h>
-#include <unistd.h>
-static volatile pthread_t main_thread;
+static volatile int a, b, c;
+
+static void
+marker_exit (void)
+{
+ a = 1;
+}
static void *
start (void *arg)
{
- int i;
+ b = 2;
+ c = 3;
- i = pthread_join (main_thread, NULL);
- assert (i == 0);
-
- return arg; /* break-here */
+ return NULL;
}
int
@@ -38,12 +41,11 @@ main (void)
pthread_t thread;
int i;
- main_thread = pthread_self ();
-
i = pthread_create (&thread, NULL, start, NULL);
assert (i == 0);
+ i = pthread_join (thread, NULL);
+ assert (i == 0);
- pthread_exit (NULL);
- /* NOTREACHED */
+ marker_exit ();
return 0;
}
« no previous file with comments | « gdb/testsuite/gdb.multi/bkpt-multi-exec.exp ('k') | gdb/testsuite/gdb.multi/watchpoint-multi.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698