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);
static void
start_debugger_thread (void)
{
- debugger_thread_handle = mono_threads_create_thread (debugger_thread, NULL, 0, 0, NULL);
+ MonoThreadParm tp;
+
+ 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);
g_assert (debugger_thread_handle);
}
static void
resume_vm (void)
{
- int err;
-
g_assert (is_debugger_thread ());
mono_loader_lock ();
}
/* Signal this even when suspend_count > 0, since some threads might have resume_count > 0 */
- err = mono_coop_cond_broadcast (&suspend_cond);
- g_assert (err == 0);
+ mono_coop_cond_broadcast (&suspend_cond);
mono_coop_mutex_unlock (&suspend_mutex);
//g_assert (err == 0);
static void
resume_thread (MonoInternalThread *thread)
{
- int err;
DebuggerTlsData *tls;
g_assert (is_debugger_thread ());
* Signal suspend_count without decreasing suspend_count, the threads will wake up
* but only the one whose resume_count field is > 0 will be resumed.
*/
- err = mono_coop_cond_broadcast (&suspend_cond);
- g_assert (err == 0);
+ mono_coop_cond_broadcast (&suspend_cond);
mono_coop_mutex_unlock (&suspend_mutex);
//g_assert (err == 0);
suspend_current (void)
{
DebuggerTlsData *tls;
- int err;
g_assert (!is_debugger_thread ());
DEBUG_PRINTF (1, "[%p] Suspended.\n", (gpointer) (gsize) mono_native_thread_id_get ());
while (suspend_count - tls->resume_count > 0) {
- err = mono_coop_cond_wait (&suspend_cond, &suspend_mutex);
- g_assert (err == 0);
+ mono_coop_cond_wait (&suspend_cond, &suspend_mutex);
}
tls->suspended = FALSE;
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);
found_sp = mono_find_next_seq_point_for_native_offset (frame->domain, frame->method, (char*)ei->handler_start - (char*)jinfo->code_start, NULL, &local_sp);
sp = (found_sp)? &local_sp : NULL;
- ss_bp_add_one (ss_req, &ss_req_bp_count, &ss_req_bp_cache, frame->method, sp->il_offset);
+ if (found_sp)
+ ss_bp_add_one (ss_req, &ss_req_bp_count, &ss_req_bp_cache, frame->method, sp->il_offset);
}
}
}
case CMD_TYPE_GET_METHODS_BY_NAME_FLAGS: {
char *name = decode_string (p, &p, end);
int i, flags = decode_int (p, &p, end);
- MonoException *ex = NULL;
- GPtrArray *array = mono_class_get_methods_by_name (klass, name, flags & ~BINDING_FLAGS_IGNORE_CASE, (flags & BINDING_FLAGS_IGNORE_CASE) != 0, TRUE, &ex);
+ MonoError error;
+ GPtrArray *array;
- if (!array)
+ mono_error_init (&error);
+ array = mono_class_get_methods_by_name (klass, name, flags & ~BINDING_FLAGS_IGNORE_CASE, (flags & BINDING_FLAGS_IGNORE_CASE) != 0, TRUE, &error);
+ if (!is_ok (&error)) {
+ mono_error_cleanup (&error);
return ERR_LOADER_ERROR;
+ }
buffer_add_int (buf, array->len);
for (i = 0; i < array->len; ++i) {
MonoMethod *method = (MonoMethod *)g_ptr_array_index (array, i);
sig = mono_method_signature (frame->actual_method);
- if (!mono_get_seq_points (frame->domain, frame->actual_method))
+ if (!jit->has_var_info || !mono_get_seq_points (frame->domain, frame->actual_method))
/*
* The method is probably from an aot image compiled without soft-debug, variables might be dead, etc.
*/
g_free (val);
} else {
guint8 *field_value = NULL;
- void *field_storage = NULL;
if (remote_obj) {
#ifndef DISABLE_REMOTING
+ void *field_storage = NULL;
field_value = mono_load_remote_field_checked(obj, obj_type, f, &field_storage, &error);
if (!is_ok (&error)) {
mono_error_cleanup (&error); /* FIXME report the error */
* 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;