Module Name: src
Committed By: christos
Date: Sun Jan 20 18:45:19 UTC 2013
Modified Files:
src/lib/libpthread_dbg: pthread_dbg.c
Log Message:
Only the first symbol (pthread_dbg) should return NOLIB, the rest indicate
internal inconsistencies, so let the code return a more vocal error.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libpthread_dbg/pthread_dbg.c
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.41 src/lib/libpthread_dbg/pthread_dbg.c:1.42
--- src/lib/libpthread_dbg/pthread_dbg.c:1.41 Sun Jan 20 13:18:07 2013
+++ src/lib/libpthread_dbg/pthread_dbg.c Sun Jan 20 13:45:19 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $ */
+/* $NetBSD: pthread_dbg.c,v 1.42 2013/01/20 18:45:19 christos Exp $ */
/*-
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $");
+__RCSID("$NetBSD: pthread_dbg.c,v 1.42 2013/01/20 18:45:19 christos Exp $");
#define __EXPOSE_STACK 1
@@ -88,27 +88,18 @@ td_open(struct td_proc_callbacks_t *cb,
proc->dbgaddr = addr;
val = LOOKUP(proc, "pthread__allqueue", &addr);
- if (val != 0) {
- if (val == TD_ERR_NOSYM)
- val = TD_ERR_NOLIB;
+ if (val != 0)
goto error;
- }
proc->allqaddr = addr;
val = LOOKUP(proc, "pthread__tsd_list", &addr);
- if (val != 0) {
- if (val == TD_ERR_NOSYM)
- val = TD_ERR_NOLIB;
+ if (val != 0)
goto error;
- }
proc->tsdlistaddr = addr;
val = LOOKUP(proc, "pthread__tsd_destructors", &addr);
- if (val != 0) {
- if (val == TD_ERR_NOSYM)
- val = TD_ERR_NOLIB;
+ if (val != 0)
goto error;
- }
proc->tsddestaddr = addr;
val = READ(proc, proc->dbgaddr, &dbg, sizeof(int));