ji = mini_jit_info_table_find (mono_domain_get (), (gpointer)ip, NULL);
- //printf ("UN: %s %lx %lx\n", ji ? ji->method->name : "", ip, sp);
+ //printf ("UN: %s %lx %lx\n", ji ? jinfo_get_method (ji)->name : "", ip, sp);
if (ji)
break;
}
ctx.precise_ip = FALSE;
- mono_handle_exception (&ctx, exc, (gpointer)(ip), FALSE);
+ mono_handle_exception (&ctx, exc);
restore_context (&ctx);
g_assert_not_reached ();
}
/*
- * mono_arch_find_jit_info_ext:
+ * mono_arch_find_jit_info:
*
* This function is used to gather information from @ctx, and store it in @frame_info.
* It unwinds one stack frame, and stores the resulting context into @new_ctx. @lmf
* is modified if needed.
* Returns TRUE on success, FALSE otherwise.
- * This function is a version of mono_arch_find_jit_info () where all the results are
- * returned in a StackFrameInfo structure.
*/
gboolean
-mono_arch_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
+mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
MonoJitInfo *ji, MonoContext *ctx,
- MonoContext *new_ctx, MonoLMF **lmf,
+ MonoContext *new_ctx, MonoLMF **lmf,
+ mgreg_t **save_locations,
StackFrameInfo *frame)
{
int err;
unw_word_t ip;
memset (frame, 0, sizeof (StackFrameInfo));
- frame->managed = FALSE;
+ frame->ji = ji;
*new_ctx = *ctx;
new_ctx->precise_ip = FALSE;
- while (TRUE) {
- err = unw_get_reg (&new_ctx->cursor, UNW_IA64_IP, &ip);
- g_assert (err == 0);
+ if (!ji) {
+ while (TRUE) {
+ err = unw_get_reg (&new_ctx->cursor, UNW_IA64_IP, &ip);
+ g_assert (err == 0);
- /* Avoid costly table lookup during stack overflow */
- if (prev_ji && ((guint8*)ip > (guint8*)prev_ji->code_start && ((guint8*)ip < ((guint8*)prev_ji->code_start) + prev_ji->code_size)))
- ji = prev_ji;
- else
ji = mini_jit_info_table_find (domain, (gpointer)ip, NULL);
- /*
- {
- char name[256];
- unw_word_t off;
-
- unw_get_proc_name (&new_ctx->cursor, name, 256, &off);
- printf ("F: %s\n", name);
- }
- */
-
- if (ji != NULL) {
- break;
+ /*
+ {
+ char name[256];
+ unw_word_t off;
+
+ unw_get_proc_name (&new_ctx->cursor, name, 256, &off);
+ printf ("F: %s\n", name);
+ }
+ */
+
+ if (ji)
+ break;
+
+ /* This is an unmanaged frame, so just unwind through it */
+ /* FIXME: This returns -3 for the __clone2 frame in libc */
+ err = unw_step (&new_ctx->cursor);
+ if (err < 0)
+ break;
+
+ if (err == 0)
+ break;
}
-
- /* This is an unmanaged frame, so just unwind through it */
- /* FIXME: This returns -3 for the __clone2 frame in libc */
- err = unw_step (&new_ctx->cursor);
- if (err < 0)
- break;
-
- if (err == 0)
- break;
}
if (ji) {
frame->type = FRAME_TYPE_MANAGED;
-
- if (!ji->method->wrapper_type || ji->method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
- frame->managed = TRUE;
+ frame->ji = ji;
//print_ctx (new_ctx);
* @obj: the exception object
*/
gboolean
-mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only)
+mono_arch_handle_exception (void *sigctx, gpointer obj)
{
/* libunwind takes care of this */
unw_context_t unw_ctx;
}
ctx.precise_ip = TRUE;
- mono_handle_exception (&ctx, obj, (gpointer)ip, test_only);
+ mono_handle_exception (&ctx, obj);
restore_context (&ctx);