#define unwind_lock() EnterCriticalSection (&unwind_mutex)
#define unwind_unlock() LeaveCriticalSection (&unwind_mutex)
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
static int map_hw_reg_to_dwarf_reg [] = { 0, 2, 1, 3, 7, 6, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
#define NUM_REGS AMD64_NREG
#define DWARF_DATA_ALIGN (-8)
*/
void
mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
- guint8 *start_ip, guint8 *end_ip, guint8 *ip, gssize *regs,
+ guint8 *start_ip, guint8 *end_ip, guint8 *ip, mgreg_t *regs,
int nregs, guint8 **out_cfa)
{
Loc locations [NUM_REGS];
* Return the unwind opcodes encoded in a DWARF FDE entry.
*/
guint8*
-mono_unwind_get_ops_from_fde (guint8 *fde, guint32 *out_len)
+mono_unwind_get_ops_from_fde (guint8 *fde, guint32 *out_len, guint32 *code_len)
{
guint8 *p, *cie, *code, *fde_cfi, *cie_cfi;
gint32 fde_len, cie_offset, pc_begin, pc_range, aug_len, fde_data_len;
fde_cfi = p;
fde_data_len = fde + 4 + fde_len - p;
+ if (code_len)
+ *code_len = pc_range;
+
/* Decode CIE */
p = cie;
cie_len = *(guint32*)p;