* threads.c: support OSX and other systems in
mono_thread_get_stack_bounds (bug #328026).
svn path=/trunk/mono/; revision=86319
+
+Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+ * threads.c: support OSX and other systems in
+ mono_thread_get_stack_bounds (bug #328026).
+
2007-09-25 Martin Baulig <martin@ximian.com>
* mono-debug.h
void
mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
{
-#ifndef PLATFORM_WIN32
+#if defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
+ *staddr = (guint8*)pthread_get_stackaddr_np (pthread_self ());
+ *stsize = pthread_get_stacksize_np (pthread_self ());
+ return;
+ /* FIXME: simplify the mess below */
+#elif !defined(PLATFORM_WIN32)
pthread_attr_t attr;
guint8 *current = (guint8*)&attr;