[runtime] Add MonoError to mono_remote_class
[mono.git] / mono / metadata / mono-debug.c
index ba9898781716d25e8d733d985411d86140929e38..09c55b3bcc8486be2385d9e3ea800cd4f954af0c 100644 (file)
@@ -100,7 +100,7 @@ lookup_data_table (MonoDomain *domain)
 {
        MonoDebugDataTable *table;
 
-       table = g_hash_table_lookup (data_table_hash, domain);
+       table = (MonoDebugDataTable *)g_hash_table_lookup (data_table_hash, domain);
        if (!table) {
                g_error ("lookup_data_table () failed for %p\n", domain);
                g_assert (table);
@@ -197,7 +197,7 @@ mono_debug_domain_unload (MonoDomain *domain)
 
        mono_debugger_lock ();
 
-       table = g_hash_table_lookup (data_table_hash, domain);
+       table = (MonoDebugDataTable *)g_hash_table_lookup (data_table_hash, domain);
        if (!table) {
                g_warning (G_STRLOC ": unloading unknown domain %p / %d",
                           domain, mono_domain_get_id (domain));
@@ -216,7 +216,7 @@ mono_debug_domain_unload (MonoDomain *domain)
 static MonoDebugHandle *
 mono_debug_get_image (MonoImage *image)
 {
-       return g_hash_table_lookup (mono_debug_handles, image);
+       return (MonoDebugHandle *)g_hash_table_lookup (mono_debug_handles, image);
 }
 
 void
@@ -444,7 +444,7 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma
                (25 + sizeof (gpointer)) * (1 + jit->num_params + jit->num_locals);
 
        if (max_size > BUFSIZ)
-               ptr = oldptr = g_malloc (max_size);
+               ptr = oldptr = (guint8 *)g_malloc (max_size);
        else
                ptr = oldptr = buffer;
 
@@ -482,9 +482,9 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma
        total_size = size + sizeof (MonoDebugMethodAddress);
 
        if (method_is_dynamic (method)) {
-               address = g_malloc0 (total_size);
+               address = (MonoDebugMethodAddress *)g_malloc0 (total_size);
        } else {
-               address = mono_mempool_alloc (table->mp, total_size);
+               address = (MonoDebugMethodAddress *)mono_mempool_alloc (table->mp, total_size);
        }
 
        address->code_start = jit->code_start;
@@ -515,7 +515,7 @@ mono_debug_remove_method (MonoMethod *method, MonoDomain *domain)
 
        table = lookup_data_table (domain);
 
-       address = g_hash_table_lookup (table->method_address_hash, method);
+       address = (MonoDebugMethodAddress *)g_hash_table_lookup (table->method_address_hash, method);
        if (address)
                g_free (address);
 
@@ -579,7 +579,7 @@ read_variable (MonoDebugVarInfo *var, guint8 *ptr, guint8 **rptr)
        var->size = read_leb128 (ptr, &ptr);
        var->begin_scope = read_leb128 (ptr, &ptr);
        var->end_scope = read_leb128 (ptr, &ptr);
-       READ_UNALIGNED (gpointer, ptr, var->type);
+       READ_UNALIGNED (MonoType *, ptr, var->type);
        ptr += sizeof (gpointer);
        *rptr = ptr;
 }
@@ -655,7 +655,7 @@ find_method (MonoMethod *method, MonoDomain *domain)
        MonoDebugMethodAddress *address;
 
        table = lookup_data_table (domain);
-       address = g_hash_table_lookup (table->method_address_hash, method);
+       address = (MonoDebugMethodAddress *)g_hash_table_lookup (table->method_address_hash, method);
 
        if (!address)
                return NULL;