2006-05-17 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Wed, 17 May 2006 10:51:31 +0000 (10:51 -0000)
committerMartin Baulig <martin@novell.com>
Wed, 17 May 2006 10:51:31 +0000 (10:51 -0000)
commit1663a14d56b8b4ad9b43b6a00d3efcb0adf4b149
tree9310a891d3dd6fec6147f50c7acca7119d801d4d
parent20f9256680027576ec788c8906c746c14a253a83
2006-05-17  Martin Baulig  <martin@ximian.com>

Fix a weird race condition which prevented XSP from working inside
the debugger - see doc/debugger-issues.txt for details.

* include/gc.h: Moved the "libgc-mono-debugger.h" #include down
after the gc_pthread_redirects.h one.

* include/libgc-mono-debugger.h
(GCThreadFunctions): Added `thread_created' and `thread_exited'.
(GC_mono_debugger_add_all_threads): New function prototype.

* pthread_stop_world.c (gc_thread_vtable): Allow the vtable and
any function in it be NULL; use NULL as the default vtable.
(GC_mono_debugger_add_all_threads): New public function.

* pthread_support.c (GC_new_thread): Use calloc() instead of
GC_INTERNAL_MALLOC() to allocate the `GC_thread' structure.
(GC_delete_thread): Call `gc_thread_vtable->thread_exited()'.
(GC_thr_init): Call `gc_thread_vtable->thread_created()'.
(GC_start_routine_head): Likewise; use calloc() instead of
GC_INTERNAL_MALLOC() to allocate the `start_info'.

svn path=/trunk/mono/; revision=60766
libgc/ChangeLog
libgc/doc/debugger-issues.txt [new file with mode: 0644]
libgc/include/gc.h
libgc/include/libgc-mono-debugger.h
libgc/pthread_stop_world.c
libgc/pthread_support.c