#include <sys/wait.h> /* for WIFEXITED, WEXITSTATUS */
#endif
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/tabledefs.h>
#include <mono/metadata/class.h>
#include <mono/metadata/object.h>
align_int64 = align;
}
#else
- align_double = __alignof__ (double);
- align_int64 = __alignof__ (gint64);
+ align_double = MONO_ABI_ALIGNOF (double);
+ align_int64 = MONO_ABI_ALIGNOF (gint64);
#endif
/* Sanity check */
jinfo->from_aot = 1;
}
+ /*
+ * Set all the 'has' flags, the mono_jit_info_get () functions depends on this to
+ * compute the addresses of data blocks.
+ */
+ if (has_generic_jit_info)
+ jinfo->has_generic_jit_info = 1;
+ if (has_arch_eh_jit_info)
+ jinfo->has_arch_eh_info = 1;
+ if (has_try_block_holes)
+ jinfo->has_try_block_holes = 1;
+
if (has_try_block_holes) {
MonoTryBlockHoleTableJitInfo *table;
- jinfo->has_try_block_holes = 1;
+ g_assert (jinfo->has_try_block_holes);
table = mono_jit_info_get_try_block_hole_table_info (jinfo);
g_assert (table);
if (has_arch_eh_jit_info) {
MonoArchEHJitInfo *eh_info;
- jinfo->has_arch_eh_info = 1;
+ g_assert (jinfo->has_arch_eh_info);
eh_info = mono_jit_info_get_arch_eh_info (jinfo);
eh_info->stack_size = decode_value (p, &p);
MonoGenericJitInfo *gi;
int len;
- jinfo->has_generic_jit_info = 1;
+ g_assert (jinfo->has_generic_jit_info);
gi = mono_jit_info_get_generic_jit_info (jinfo);
g_assert (gi);
mono_aot_unlock ();
}
- p = amodule->unwind_info + ji->used_regs;
+ /* The upper 16 bits of ji->used_regs might contain the epilog offset */
+ p = amodule->unwind_info + (ji->used_regs & 0xffff);
*unwind_info_len = decode_value (p, &p);
return p;
}