Author: martin
Date: 2006-05-17 14:59:53 -0400 (Wed, 17 May 2006)
New Revision: 60799
Modified:
trunk/mono/libgc/ChangeLog
trunk/mono/libgc/include/libgc-mono-debugger.h
trunk/mono/libgc/pthread_stop_world.c
trunk/mono/libgc/pthread_support.c
Log:
2006-05-17 Martin Baulig <[EMAIL PROTECTED]>
* pthread-support.c, pthread-stop-world.c: Put the debugger stuff
inside a `#if LIBGC_MONO_DEBUGGER_SUPPORTED' conditional.
Modified: trunk/mono/libgc/ChangeLog
===================================================================
--- trunk/mono/libgc/ChangeLog 2006-05-17 18:43:54 UTC (rev 60798)
+++ trunk/mono/libgc/ChangeLog 2006-05-17 18:59:53 UTC (rev 60799)
@@ -1,5 +1,10 @@
2006-05-17 Martin Baulig <[EMAIL PROTECTED]>
+ * pthread-support.c, pthread-stop-world.c: Put the debugger stuff
+ inside a `#if LIBGC_MONO_DEBUGGER_SUPPORTED' conditional.
+
+2006-05-17 Martin Baulig <[EMAIL PROTECTED]>
+
Fix a weird race condition which prevented XSP from working inside
the debugger - see doc/debugger-issues.txt for details.
Modified: trunk/mono/libgc/include/libgc-mono-debugger.h
===================================================================
--- trunk/mono/libgc/include/libgc-mono-debugger.h 2006-05-17 18:43:54 UTC
(rev 60798)
+++ trunk/mono/libgc/include/libgc-mono-debugger.h 2006-05-17 18:59:53 UTC
(rev 60799)
@@ -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 @@
#endif
+#endif
+
Modified: trunk/mono/libgc/pthread_stop_world.c
===================================================================
--- trunk/mono/libgc/pthread_stop_world.c 2006-05-17 18:43:54 UTC (rev
60798)
+++ trunk/mono/libgc/pthread_stop_world.c 2006-05-17 18:59:53 UTC (rev
60799)
@@ -412,9 +412,11 @@
/* 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 @@
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 @@
/* 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 @@
}
}
+#endif
#endif
Modified: trunk/mono/libgc/pthread_support.c
===================================================================
--- trunk/mono/libgc/pthread_support.c 2006-05-17 18:43:54 UTC (rev 60798)
+++ trunk/mono/libgc/pthread_support.c 2006-05-17 18:59:53 UTC (rev 60799)
@@ -691,8 +691,10 @@
} 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 @@
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 @@
/* 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;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches