diff options
author | Martin Baulig <martin@novell.com> | 2006-05-17 22:59:53 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2006-05-17 22:59:53 +0400 |
commit | 40468002200e10b85d8ff80d9e19badc57ddb77b (patch) | |
tree | 3dee4527821774d922b600adab71bc994e2ea954 /libgc | |
parent | 4cc1d915e14439d44e447fa615e9b975f0848289 (diff) |
2006-05-17 Martin Baulig <martin@ximian.com>
* pthread-support.c, pthread-stop-world.c: Put the debugger stuff
inside a `#if LIBGC_MONO_DEBUGGER_SUPPORTED' conditional.
svn path=/trunk/mono/; revision=60799
Diffstat (limited to 'libgc')
-rw-r--r-- | libgc/ChangeLog | 5 | ||||
-rw-r--r-- | libgc/include/libgc-mono-debugger.h | 4 | ||||
-rw-r--r-- | libgc/pthread_stop_world.c | 9 | ||||
-rw-r--r-- | libgc/pthread_support.c | 6 |
4 files changed, 24 insertions, 0 deletions
diff --git a/libgc/ChangeLog b/libgc/ChangeLog index 57131e0988c..bb4a09b2c31 100644 --- a/libgc/ChangeLog +++ b/libgc/ChangeLog @@ -1,5 +1,10 @@ 2006-05-17 Martin Baulig <martin@ximian.com> + * pthread-support.c, pthread-stop-world.c: Put the debugger stuff + inside a `#if LIBGC_MONO_DEBUGGER_SUPPORTED' conditional. + +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. diff --git a/libgc/include/libgc-mono-debugger.h b/libgc/include/libgc-mono-debugger.h index ffeefd7a30a..f577a5045a8 100644 --- a/libgc/include/libgc-mono-debugger.h +++ b/libgc/include/libgc-mono-debugger.h @@ -1,6 +1,8 @@ #ifndef LIBGC_MONO_DEBUGGER_H #define LIBGC_MONO_DEBUGGER_H +#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED + #if defined(_IN_LIBGC_GC_H) || defined(_IN_THE_MONO_DEBUGGER) typedef struct @@ -25,3 +27,5 @@ GC_mono_debugger_add_all_threads (void); #endif +#endif + diff --git a/libgc/pthread_stop_world.c b/libgc/pthread_stop_world.c index 6291d47fb2d..6c0ca18ec6f 100644 --- a/libgc/pthread_stop_world.c +++ b/libgc/pthread_stop_world.c @@ -412,9 +412,11 @@ void GC_stop_world() /* We should have previously waited for it to become zero. */ # endif /* PARALLEL_MARK */ ++GC_stop_count; +#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED if (gc_thread_vtable && gc_thread_vtable->stop_world) gc_thread_vtable->stop_world (); else +#endif pthread_stop_world (); # ifdef PARALLEL_MARK GC_release_mark_lock(); @@ -481,9 +483,11 @@ static void pthread_start_world() void GC_start_world() { +#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED if (gc_thread_vtable && gc_thread_vtable->start_world) gc_thread_vtable->start_world(); else +#endif pthread_start_world (); } @@ -533,12 +537,16 @@ static void pthread_stop_init() { /* We hold the allocation lock. */ void GC_stop_init() { +#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED if (gc_thread_vtable && gc_thread_vtable->initialize) gc_thread_vtable->initialize (); else +#endif pthread_stop_init (); } +#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED + GCThreadFunctions *gc_thread_vtable = NULL; void @@ -556,5 +564,6 @@ GC_mono_debugger_add_all_threads (void) } } +#endif #endif diff --git a/libgc/pthread_support.c b/libgc/pthread_support.c index 7f3c31efd81..92878c87c2a 100644 --- a/libgc/pthread_support.c +++ b/libgc/pthread_support.c @@ -691,8 +691,10 @@ void GC_delete_thread(pthread_t id) } else { prev -> next = p -> next; } +#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED if (gc_thread_vtable && gc_thread_vtable->thread_exited) gc_thread_vtable->thread_exited (id, &p->stop_info.stack_ptr); +#endif free(p); } @@ -970,8 +972,10 @@ void GC_thr_init() t -> stop_info.stack_ptr = (ptr_t)(&dummy); # endif t -> flags = DETACHED | MAIN_THREAD; +#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED if (gc_thread_vtable && gc_thread_vtable->thread_created) gc_thread_vtable->thread_created (pthread_self (), &t->stop_info.stack_ptr); +#endif GC_stop_init(); @@ -1277,8 +1281,10 @@ void * GC_start_routine_head(void * arg, void *base_addr, /* This is also < 100% convincing. We should also read this */ /* from /proc, but the hook to do so isn't there yet. */ # endif /* IA64 */ +#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED if (gc_thread_vtable && gc_thread_vtable->thread_created) gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr); +#endif UNLOCK(); if (start) *start = si -> start_routine; |