From: Martin Baulig Date: Wed, 22 Aug 2007 16:25:40 +0000 (+0000) Subject: 2007-08-22 Martin Baulig X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8358e38fdb05cc4a5b024e4332d0dc56a717e48;p=gc 2007-08-22 Martin Baulig * pthread_stop_world.c (GC_mono_debugger_add_all_threads): Removed. (GC_mono_debugger_get_stack_ptr): New public function. svn path=/trunk/mono/; revision=84647 --- diff --git a/ChangeLog b/ChangeLog index ffdf7cc9..361c81b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-08-22 Martin Baulig + + * pthread_stop_world.c + (GC_mono_debugger_add_all_threads): Removed. + (GC_mono_debugger_get_stack_ptr): New public function. Wed Jul 4 17:46:19 CEST 2007 Paolo Molaro diff --git a/include/libgc-mono-debugger.h b/include/libgc-mono-debugger.h index d1606d7c..bbf44391 100644 --- a/include/libgc-mono-debugger.h +++ b/include/libgc-mono-debugger.h @@ -16,8 +16,8 @@ typedef struct extern GCThreadFunctions *gc_thread_vtable; -extern void -GC_mono_debugger_add_all_threads (void); +extern void * +GC_mono_debugger_get_stack_ptr (void); #else #error "This header is only intended to be used by the Mono Debugger" diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 39e8d5d8..1ed16132 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -561,19 +561,13 @@ void GC_stop_init() GCThreadFunctions *gc_thread_vtable = NULL; -void -GC_mono_debugger_add_all_threads (void) +void * +GC_mono_debugger_get_stack_ptr (void) { - GC_thread p; - int i; + GC_thread me; - if (gc_thread_vtable && gc_thread_vtable->thread_created) { - for (i = 0; i < THREAD_TABLE_SZ; i++) { - for (p = GC_threads[i]; p != 0; p = p -> next) { - gc_thread_vtable->thread_created (p->id, &p->stop_info.stack_ptr); - } - } - } + me = GC_lookup_thread (pthread_self ()); + return &me->stop_info.stack_ptr; } #endif