mono_debugger_start_class_init_func = mono_debug_start_add_type;
mono_debugger_class_init_func = mono_debug_add_type;
mono_install_assembly_load_hook (mono_debug_add_assembly, NULL);
- mono_debugger_unlock ();
}
void
return -1;
}
-/*
+/**
+ * mono_debug_source_location_from_address:
+ * @method:
+ * @address:
+ * @line_number:
+ * @domain:
+ *
* Used by the exception code to get a source location from a machine address.
*
- * Returns a textual representation of the specified address which is suitable to be displayed to
+ * Returns: a textual representation of the specified address which is suitable to be displayed to
* the user (for instance "/home/martin/monocvs/debugger/test/Y.cs:8").
*
* If the optional @line_number argument is not NULL, the line number is stored there and just the
mono_debug_source_location_from_address (MonoMethod *method, guint32 address, guint32 *line_number,
MonoDomain *domain)
{
- char *res;
MonoDebugMethodInfo *minfo;
MonoDebugDomainData *domain_data;
- mono_debugger_lock ();
+ mono_loader_lock ();
minfo = _mono_debug_lookup_method (method);
if (!minfo || !minfo->handle || !minfo->handle->symfile ||
!minfo->handle->symfile->offset_table) {
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return NULL;
}
domain_data = mono_debug_get_domain_data (minfo->handle, domain);
if (!domain_data->jit [minfo->index]) {
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return NULL;
}
if (offset >= 0)
res = mono_debug_find_source_location (minfo->handle->symfile, method, offset, line_number);
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return res;
}
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return NULL;
}
-/*
+/**
+ * mono_debug_source_location_from_il_offset:
+ * @method:
+ * @offset:
+ * @line_number:
+ *
* Used by the exception code to get a source location from an IL offset.
*
* Returns a textual representation of the specified address which is suitable to be displayed to
char *res;
MonoDebugMethodInfo *minfo;
- mono_debugger_lock ();
+ mono_loader_lock ();
minfo = _mono_debug_lookup_method (method);
if (!minfo || !minfo->handle || !minfo->handle->symfile) {
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return NULL;
}
res = mono_debug_find_source_location (minfo->handle->symfile, method, offset, line_number);
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return res;
}
-/*
- * Returns the IL offset corresponding to machine address @address which is an offset
+/**
+ * mono_debug_il_offset_from_address:
+ * @method:
+ * @address:
+ * @domain:
+ *
+ * Returns: the IL offset corresponding to machine address @address which is an offset
* relative to the beginning of the method @method.
*/
gint32
if (address < 0)
return -1;
- mono_debugger_lock ();
+ mono_loader_lock ();
minfo = _mono_debug_lookup_method (method);
if (!minfo || !minfo->il_offsets || !minfo->handle || !minfo->handle->symfile ||
!minfo->handle->symfile->offset_table) {
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return -1;
}
domain_data = mono_debug_get_domain_data (minfo->handle, domain);
res = il_offset_from_address (domain_data->jit [minfo->index], address);
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return res;
}
-/*
- * Returns the machine address corresponding to IL offset @il_offset.
+/**
+ * mono_debug_address_from_il_offset:
+ * @method:
+ * @il_offset:
+ * @domain:
+ *
+ * Returns: the machine address corresponding to IL offset @il_offset.
* The returned value is an offset relative to the beginning of the method @method.
*/
gint32
if (il_offset < 0)
return -1;
- mono_debugger_lock ();
+ mono_loader_lock ();
minfo = _mono_debug_lookup_method (method);
if (!minfo || !minfo->il_offsets || !minfo->handle || !minfo->handle->symfile ||
!minfo->handle->symfile->offset_table) {
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return -1;
}
domain_data = mono_debug_get_domain_data (minfo->handle, domain);
res = _mono_debug_address_from_il_offset (domain_data->jit [minfo->index], il_offset);
- mono_debugger_unlock ();
+ mono_loader_unlock ();
return res;
}