Date: Sun, 27 Jun 2004 04:38:33 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 55895 for review Message-ID: <200406270438.i5R4cXrN088868@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=55895 Change 55895 by davidxu@davidxu_alona on 2004/06/27 04:38:14 Add variable _libkse_debug, debugger should write it a nonzero value to tell libpthread it is being debugged. Affected files ... .. //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_init.c#2 edit .. //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_private.h#2 edit Differences ... ==== //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_init.c#2 (text+ko) ==== @@ -310,6 +310,12 @@ _thr_signal_init(); _kse_critical_leave(&_thr_initial->tcb->tcb_tmbx); + /* + * activate threaded mode as soon as possible if we are + * being debugged + */ + if (_libkse_debug) + _kse_setthreaded(1); } /* ==== //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_private.h#2 (text+ko) ==== @@ -980,6 +980,8 @@ SCLASS void *_usrstack SCLASS_PRESET(NULL); SCLASS struct kse *_kse_initial SCLASS_PRESET(NULL); SCLASS struct pthread *_thr_initial SCLASS_PRESET(NULL); +/* For debugger */ +SCLASS int _libkse_debug SCLASS_PRESET(0); /* List of all threads: */ SCLASS TAILQ_HEAD(, pthread) _thread_list
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406270438.i5R4cXrN088868>