}
static void
-interp_walk_stack (MonoStackWalk func, gpointer user_data)
+interp_walk_stack (MonoStackWalk func, gboolean do_il_offset, gpointer user_data)
{
ThreadContext *context = TlsGetValue (thread_context_id);
- MonoInvocation *frame = context->current_frame;
+ MonoInvocation *frame;
int il_offset;
MonoMethodHeader *hd;
+ if (!context) return;
+
+ frame = context->current_frame;
+
while (frame) {
gboolean managed = FALSE;
MonoMethod *method = frame->runtime_method->method;
g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR);
- g_thread_init (NULL);
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
thread_context_id = TlsAlloc ();
TlsSetValue (thread_context_id, NULL);
mono_runtime_init (domain, NULL, NULL);
+ mono_thread_attach (domain);
return domain;
}
if (argc < 2)
usage ();
+ MONO_GC_PRE_INIT ();
+
for (i = 1; i < argc && argv [i][0] == '-'; i++){
if (strcmp (argv [i], "--trace") == 0)
global_tracing = 1;