Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2005 13:22:15 GMT
From:      David Xu <davidxu@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 71310 for review
Message-ID:  <200502191322.j1JDMFQh024110@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=71310

Change 71310 by davidxu@davidxu_alona on 2005/02/19 13:21:44

	Sync with libthread code.

Affected files ...

.. //depot/projects/davidxu_thread/src/lib/libthread_db/libpthread2_db.c#2 edit
.. //depot/projects/davidxu_thread/src/lib/libthread_db/libpthread2_db.h#2 edit
.. //depot/projects/davidxu_thread/src/lib/libthread_db/thread_db.c#2 edit

Differences ...

==== //depot/projects/davidxu_thread/src/lib/libthread_db/libpthread2_db.c#2 (text+ko) ====

@@ -155,13 +155,11 @@
 		return (TD_MALLOC);
 
 	ta->ph = ph;
-	ta->thread_inited = 0;
 	ta->map = NULL;
 	ta->map_len = 0;
 
-	LOOKUP_SYM(ph, "_libkse2_debug",	&ta->libkse_debug_addr);
+	LOOKUP_SYM(ph, "_libthread_debug",	&ta->libthread_debug_addr);
 	LOOKUP_SYM(ph, "_thread_list",		&ta->thread_list_addr);
-	LOOKUP_SYM(ph, "_thread_inited",	&ta->thread_inited_addr);
 	LOOKUP_SYM(ph, "_thread_active_threads",&ta->thread_active_threads_addr);
 	LOOKUP_SYM(ph, "_thread_keytable",	&ta->thread_keytable_addr);
 	LOOKUP_VAL(ph, "_thread_off_dtv",	&ta->thread_off_dtv);
@@ -185,7 +183,7 @@
 	 * If this fails it probably means we're debugging a core file and
 	 * can't write to it.
 	 */
-	ps_pwrite(ph, ta->libkse_debug_addr, &dbg, sizeof(int));
+	ps_pwrite(ph, ta->libthread_debug_addr, &dbg, sizeof(int));
 	*pta = ta;
 	return (0);
 
@@ -206,7 +204,7 @@
 	 * Error returns from this write are not really a problem;
 	 * the process doesn't exist any more.
 	 */
-	ps_pwrite(ta->ph, ta->libkse_debug_addr, &dbg, sizeof(int));
+	ps_pwrite(ta->ph, ta->libthread_debug_addr, &dbg, sizeof(int));
 	if (ta->map)
 		free(ta->map);
 	free(ta);
@@ -318,17 +316,10 @@
 	td_thrhandle_t th;
 	long tmp_lwp;
 	psaddr_t pt;
-	int ret, inited, isdead;
+	int ret, isdead;
 
 	TDBG_FUNC();
 
-	ret = ps_pread(ta->ph, ta->thread_inited_addr, &inited, sizeof(int));
-	if (ret != 0)
-		return (P2T(ret));
-
-	if (!inited)
-		return (TD_OK);
-
 	ret = ps_pread(ta->ph, ta->thread_list_addr, &thread_list,
 		       sizeof(thread_list));
 	if (ret != 0)

==== //depot/projects/davidxu_thread/src/lib/libthread_db/libpthread2_db.h#2 (text+ko) ====

@@ -42,10 +42,9 @@
 
 struct td_thragent {
 	TD_THRAGENT_FIELDS;
-	psaddr_t	libkse_debug_addr;
+	psaddr_t	libthread_debug_addr;
 	psaddr_t	thread_list_addr;
 	psaddr_t	thread_listgen_addr;
-	psaddr_t	thread_inited_addr;
 	psaddr_t	thread_active_threads_addr;
 	psaddr_t	thread_keytable_addr;
 	int		thread_inited;

==== //depot/projects/davidxu_thread/src/lib/libthread_db/thread_db.c#2 (text+ko) ====

@@ -44,11 +44,13 @@
 extern struct ta_ops libc_r_db_ops;
 extern struct ta_ops libpthread_db_ops;
 extern struct ta_ops libthr_db_ops;
+extern struct ta_ops libpthread2_db_ops;
 
 static struct ta_ops *ops[] = {
 	&libpthread_db_ops,
 	&libthr_db_ops,
-	&libc_r_db_ops
+	&libc_r_db_ops,
+	&libpthread2_db_ops
 };
 
 td_err_e



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502191322.j1JDMFQh024110>