Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mono/mini/ChangeLog6
-rw-r--r--mono/mini/mini.c13
2 files changed, 17 insertions, 2 deletions
diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog
index 637afbda781..106327f0891 100644
--- a/mono/mini/ChangeLog
+++ b/mono/mini/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * mini.c:
+ (print_method_from_ip): also print source location information if
+ available.
+
2003-06-02 Dietmar Maurer <dietmar@ximian.com>
* mini.c (mono_find_block_region): bug fix in region code
diff --git a/mono/mini/mini.c b/mono/mini/mini.c
index cd83ddb5c53..9e247e46ec3 100644
--- a/mono/mini/mini.c
+++ b/mono/mini/mini.c
@@ -163,19 +163,28 @@ mono_method_blittable (MonoMethod *method)
#endif
/* debug function */
-static void
+G_GNUC_UNUSED static void
print_method_from_ip (void *ip)
{
MonoJitInfo *ji;
char *method;
+ char *source;
+ MonoDomain *domain = mono_domain_get ();
- ji = mono_jit_info_table_find (mono_domain_get (), ip);
+ ji = mono_jit_info_table_find (domain, ip);
if (!ji) {
g_print ("No method at %p\n", ip);
return;
}
method = mono_method_full_name (ji->method, TRUE);
+ source = mono_debug_source_location_from_address (ji->method, (int) ip, NULL, domain);
+
g_print ("IP at offset 0x%x of method %s (%p %p)\n", (char*)ip - (char*)ji->code_start, method, ji->code_start, (char*)ji->code_start + ji->code_size);
+
+ if (source)
+ g_print ("%s\n", source);
+
+ g_free (source);
g_free (method);
}