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

Unified Diff: gdb/testsuite/gdb.threads/dlopen-libpthread-lib.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/dlopen-libpthread.exp ('k') | gdb/testsuite/gdb.threads/execl.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.c b/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
similarity index 71%
copy from gdb/testsuite/gdb.multi/watchpoint-multi.c
copy to gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
index 51697b0b3e34a1dc7725c281b247de4bb49575b5..85fb2dd3e8c6f83a2774bdfa821db32b62460d83 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.c
+++ b/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2012 Free Software Foundation, Inc.
+ Copyright 2011-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
@@ -18,34 +18,23 @@
#include <pthread.h>
#include <assert.h>
-static volatile int a, b, c;
-
-static void
-marker_exit (void)
-{
- a = 1;
-}
-
static void *
-start (void *arg)
+tfunc (void *arg)
{
- b = 2;
- c = 3;
+ void (*notifyp) (void) = arg;
- return NULL;
+ notifyp ();
}
-int
-main (void)
+void
+f (void (*notifyp) (void))
{
- pthread_t thread;
+ pthread_t t;
int i;
- i = pthread_create (&thread, NULL, start, NULL);
- assert (i == 0);
- i = pthread_join (thread, NULL);
+ i = pthread_create (&t, NULL, tfunc, notifyp);
assert (i == 0);
- marker_exit ();
- return 0;
+ i = pthread_join (t, NULL);
+ assert (i == 0);
}
« no previous file with comments | « gdb/testsuite/gdb.threads/dlopen-libpthread.exp ('k') | gdb/testsuite/gdb.threads/execl.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698