PERFORCE change 55895 for review
David Xu
davidxu at FreeBSD.org
Sun Jun 27 04:38:51 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=55895
Change 55895 by davidxu at 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
More information about the p4-projects
mailing list