Module Name:    src
Committed By:   christos
Date:           Sun Jan 20 18:18:07 UTC 2013

Modified Files:
        src/lib/libpthread_dbg: pthread_dbg.c pthread_dbg_int.h

Log Message:
tsd_alloc is no more, use tsd_list, and disable the destructor walking code
since it needs work. Fixes gdb.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/libpthread_dbg/pthread_dbg.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libpthread_dbg/pthread_dbg_int.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread_dbg/pthread_dbg.c
diff -u src/lib/libpthread_dbg/pthread_dbg.c:1.40 src/lib/libpthread_dbg/pthread_dbg.c:1.41
--- src/lib/libpthread_dbg/pthread_dbg.c:1.40	Fri Mar  7 17:27:07 2008
+++ src/lib/libpthread_dbg/pthread_dbg.c	Sun Jan 20 13:18:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_dbg.c,v 1.40 2008/03/07 22:27:07 ad Exp $	*/
+/*	$NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_dbg.c,v 1.40 2008/03/07 22:27:07 ad Exp $");
+__RCSID("$NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $");
 
 #define __EXPOSE_STACK 1
 
@@ -95,13 +95,13 @@ td_open(struct td_proc_callbacks_t *cb, 
 	}
 	proc->allqaddr = addr;
 
-	val = LOOKUP(proc, "pthread__tsd_alloc", &addr);
+	val = LOOKUP(proc, "pthread__tsd_list", &addr);
 	if (val != 0) {
 		if (val == TD_ERR_NOSYM)
 			val = TD_ERR_NOLIB;
 		goto error;
 	}
-	proc->tsdallocaddr = addr;
+	proc->tsdlistaddr = addr;
 
 	val = LOOKUP(proc, "pthread__tsd_destructors", &addr);
 	if (val != 0) {
@@ -418,13 +418,14 @@ int
 td_tsd_iter(td_proc_t *proc,
     int (*call)(pthread_key_t, void (*)(void *), void *), void *arg)
 {
+#ifdef notyet
 	int val;
 	int i;
 	void *allocated;
 	void (*destructor)(void *);
 
 	for (i = 0; i < PTHREAD_KEYS_MAX; i++) {
-		val = READ(proc, proc->tsdallocaddr + i * sizeof(allocated),
+		val = READ(proc, proc->tsdlistaddr + i * sizeof(allocated),
 		    &allocated, sizeof(allocated));
 		if (val != 0)
 			return val;
@@ -441,6 +442,9 @@ td_tsd_iter(td_proc_t *proc,
 				return val;
 		}
 	}
+#else
+	abort();
+#endif
 
 	return 0;
 }

Index: src/lib/libpthread_dbg/pthread_dbg_int.h
diff -u src/lib/libpthread_dbg/pthread_dbg_int.h:1.6 src/lib/libpthread_dbg/pthread_dbg_int.h:1.7
--- src/lib/libpthread_dbg/pthread_dbg_int.h:1.6	Tue Oct 16 11:06:11 2007
+++ src/lib/libpthread_dbg/pthread_dbg_int.h	Sun Jan 20 13:18:07 2013
@@ -12,7 +12,7 @@ struct td_proc_st {
 	caddr_t idleqaddr;
 	caddr_t suspqaddr;
 	caddr_t maxlwpsaddr;
-	caddr_t tsdallocaddr;
+	caddr_t tsdlistaddr;
 	caddr_t tsddestaddr;
 
 	caddr_t stacksizeaddr;

Reply via email to