From 70a9379d7adb50dd62a40a1c8076e328c8b7192c Mon Sep 17 00:00:00 2001 From: Alex Ronne Petersen Date: Wed, 4 Dec 2013 11:37:33 +0100 Subject: Remove some more mdb bits. --- darwin_stop_world.c | 17 ----------------- include/libgc-mono-debugger.h | 27 --------------------------- pthread_stop_world.c | 34 ---------------------------------- pthread_support.c | 24 ------------------------ 4 files changed, 102 deletions(-) delete mode 100644 include/libgc-mono-debugger.h diff --git a/darwin_stop_world.c b/darwin_stop_world.c index a53cda35..ee7b1a9d 100644 --- a/darwin_stop_world.c +++ b/darwin_stop_world.c @@ -5,10 +5,6 @@ #include #include "mono/utils/mono-compiler.h" -#ifdef MONO_DEBUGGER_SUPPORTED -#include "include/libgc-mono-debugger.h" -#endif - /* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple Page 49: "The space beneath the stack pointer, where a new stack frame would normally @@ -736,17 +732,4 @@ void GC_darwin_register_mach_handler_thread(mach_port_t thread) { GC_use_mach_handler_thread = 1; } -#ifdef MONO_DEBUGGER_SUPPORTED -GCThreadFunctions *gc_thread_vtable = NULL; - -void * -GC_mono_debugger_get_stack_ptr (void) -{ - GC_thread me; - - me = GC_lookup_thread (pthread_self ()); - return &me->stop_info.stack_ptr; -} -#endif - #endif diff --git a/include/libgc-mono-debugger.h b/include/libgc-mono-debugger.h deleted file mode 100644 index bbf44391..00000000 --- a/include/libgc-mono-debugger.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef LIBGC_MONO_DEBUGGER_H -#define LIBGC_MONO_DEBUGGER_H - -#if defined(_IN_LIBGC) || defined(_IN_THE_MONO_DEBUGGER) - -typedef struct -{ - void (* initialize) (void); - - void (* thread_created) (pthread_t tid, void *stack_ptr); - void (* thread_exited) (pthread_t tid, void *stack_ptr); - - void (* stop_world) (void); - void (* start_world) (void); -} GCThreadFunctions; - -extern GCThreadFunctions *gc_thread_vtable; - -extern void * -GC_mono_debugger_get_stack_ptr (void); - -#else -#error "This header is only intended to be used by the Mono Debugger" -#endif - -#endif - diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 334ff1de..c5016416 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -19,10 +19,6 @@ #undef PACKAGE_VERSION #include "mono/utils/mono-compiler.h" -#ifdef MONO_DEBUGGER_SUPPORTED -#include "include/libgc-mono-debugger.h" -#endif - #ifdef NACL volatile int __nacl_thread_suspension_needed = 0; pthread_t nacl_thread_parker = -1; @@ -625,11 +621,6 @@ void GC_stop_world() /* We should have previously waited for it to become zero. */ # endif /* PARALLEL_MARK */ ++GC_stop_count; -#ifdef 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(); @@ -717,11 +708,6 @@ static void pthread_start_world() void GC_start_world() { -#ifdef MONO_DEBUGGER_SUPPORTED - if (gc_thread_vtable && gc_thread_vtable->start_world) - gc_thread_vtable->start_world(); - else -#endif pthread_start_world (); } @@ -773,27 +759,7 @@ static void pthread_stop_init() { /* We hold the allocation lock. */ void GC_stop_init() { -#ifdef MONO_DEBUGGER_SUPPORTED - if (gc_thread_vtable && gc_thread_vtable->initialize) - gc_thread_vtable->initialize (); - else -#endif pthread_stop_init (); } -#ifdef MONO_DEBUGGER_SUPPORTED - -GCThreadFunctions *gc_thread_vtable = NULL; - -void * -GC_mono_debugger_get_stack_ptr (void) -{ - GC_thread me; - - me = GC_lookup_thread (pthread_self ()); - return &me->stop_info.stack_ptr; -} - -#endif - #endif diff --git a/pthread_support.c b/pthread_support.c index b302688a..a8c8b330 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -222,10 +222,6 @@ static int GC_setspecific (GC_key_t key, void *value) { static GC_bool keys_initialized; -#ifdef MONO_DEBUGGER_SUPPORTED -#include "include/libgc-mono-debugger.h" -#endif - /* Recover the contents of the freelist array fl into the global one gfl.*/ /* Note that the indexing scheme differs, in that gfl has finer size */ /* resolution, even if not all entries are used. */ @@ -804,10 +800,6 @@ void GC_delete_thread(pthread_t id) } else { prev -> next = p -> next; } -#ifdef MONO_DEBUGGER_SUPPORTED - if (gc_thread_vtable && gc_thread_vtable->thread_exited) - gc_thread_vtable->thread_exited (id, &p->stop_info.stack_ptr); -#endif #ifdef GC_DARWIN_THREADS mach_port_deallocate(mach_task_self(), p->stop_info.mach_thread); @@ -1124,14 +1116,6 @@ void GC_thr_init() t -> stop_info.stack_ptr = (ptr_t)(&dummy); # endif t -> flags = DETACHED | MAIN_THREAD; -#ifdef MONO_DEBUGGER_SUPPORTED - if (gc_thread_vtable && gc_thread_vtable->thread_created) -# ifdef GC_DARWIN_THREADS - gc_thread_vtable->thread_created (mach_thread_self (), &t->stop_info.stack_ptr); -# else - gc_thread_vtable->thread_created (pthread_self (), &t->stop_info.stack_ptr); -# endif -#endif if (pthread_self () == main_pthread_self) { t->stack = main_stack; t->stack_size = main_stack_size; @@ -1461,14 +1445,6 @@ 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 MONO_DEBUGGER_SUPPORTED - if (gc_thread_vtable && gc_thread_vtable->thread_created) -# ifdef GC_DARWIN_THREADS - gc_thread_vtable->thread_created (mach_thread_self(), &me->stop_info.stack_ptr); -# else - gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr); -# endif -#endif UNLOCK(); if (start) *start = si -> start_routine; -- cgit v1.2.1