#include <mono/utils/mono-math.h>
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-counters.h>
+#include <mono/utils/mono-error-internals.h>
#include <mono/utils/mono-logger-internal.h>
#include <mono/utils/mono-mmap.h>
#include <mono/utils/mono-path.h>
mono_debug_count (void)
{
static int count = 0;
- count ++;
static gboolean inited;
static const char *value;
+ count ++;
+
if (!inited) {
value = g_getenv ("COUNT");
inited = TRUE;
cfg->code_len = code - cfg->native_code;
cfg->prolog_end = cfg->code_len;
+ cfg->cfa_reg = cfg->cur_cfa_reg;
+ cfg->cfa_offset = cfg->cur_cfa_offset;
mono_debug_open_method (cfg);
if (bb == cfg->bb_exit) {
cfg->epilog_begin = cfg->code_len;
mono_arch_emit_epilog (cfg);
+ cfg->epilog_end = cfg->code_len;
}
}
info = mono_jit_info_get_arch_eh_info (jinfo);
g_assert (info);
- info->epilog_size = cfg->code_size - cfg->epilog_begin;
+ info->epilog_size = cfg->code_len - cfg->epilog_begin;
}
jinfo->unwind_info = unwind_desc;
g_free (unwind_info);
if (cfg->gen_seq_points)
cfg->seq_points = g_ptr_array_new ();
+ mono_error_init (&cfg->error);
if (cfg->compile_aot && !try_generic_shared && (method->is_generic || method->klass->generic_container || method_is_gshared)) {
cfg->exception_type = MONO_EXCEPTION_GENERIC_SHARING_FAILED;
*/
//#define DEBUGSSA "logic_run"
-#define DEBUGSSA_CLASS "Tests"
+//#define DEBUGSSA_CLASS "Tests"
#ifdef DEBUGSSA
if (!cfg->disable_ssa) {
case MONO_EXCEPTION_OUT_OF_MEMORY:
ex = mono_domain_get ()->out_of_memory_ex;
break;
+ case MONO_EXCEPTION_MONO_ERROR:
+ g_assert (!mono_error_ok (&cfg->error));
+ ex = mono_error_convert_to_exception (&cfg->error);
+ break;
default:
g_assert_not_reached ();
}
if (fault_addr == NULL) {
MonoContext mctx;
- mono_arch_sigctx_to_monoctx (ctx, &mctx);
+ mono_sigctx_to_monoctx (ctx, &mctx);
fault_addr = MONO_CONTEXT_GET_SP (&mctx);
}