Merge pull request #3403 from ntherning/fix-handler-block-trampoline-crash-on-win64
[mono.git] / mono / mini / debugger-agent.c
index 09faef99896bc0d3e56cd6f64ed73786a8612069..ed3bee869a155630c8b1f6256d273db39a8487ff 100644 (file)
@@ -727,7 +727,7 @@ static void transport_connect (const char *address);
 static gboolean transport_handshake (void);
 static void register_transport (DebuggerTransport *trans);
 
-static guint32 WINAPI debugger_thread (void *arg);
+static gsize WINAPI debugger_thread (void *arg);
 
 static void runtime_initialized (MonoProfiler *prof);
 
@@ -1629,7 +1629,7 @@ start_debugger_thread (void)
 {
        MonoThreadParm tp;
 
-       tp.priority = 0;
+       tp.priority = MONO_THREAD_PRIORITY_NORMAL;
        tp.stack_size = 0;
        tp.creation_flags = 0;
        debugger_thread_handle = mono_threads_create_thread (debugger_thread, NULL, &tp, NULL);
@@ -4328,6 +4328,7 @@ set_bp_in_method (MonoDomain *domain, MonoMethod *method, MonoSeqPointInfo *seq_
                MonoError oerror;
 
                /* Might be AOTed code */
+               mono_class_init (method->klass);
                code = mono_aot_get_method_checked (domain, method, &oerror);
                g_assert (code);
                mono_error_assert_ok (&oerror);
@@ -9808,7 +9809,7 @@ wait_for_attach (void)
  *   This thread handles communication with the debugger client using a JDWP
  * like protocol.
  */
-static guint32 WINAPI
+static gsize WINAPI
 debugger_thread (void *arg)
 {
        MonoError error;