X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fmini-unwind.h;h=3d14e9cde783e8bf6f3ae6e51a068a0f789f9c03;hb=e343ad0cfd404c92761cd6e0f683ccd46402897b;hp=1085cbe0e3fcd3e4151a55978bc28c0d3fdf986e;hpb=a1ab4919b0abcd3685ca2e4c241a69301ab52cfe;p=mono.git diff --git a/mono/mini/mini-unwind.h b/mono/mini/mini-unwind.h index 1085cbe0e3f..3d14e9cde78 100644 --- a/mono/mini/mini-unwind.h +++ b/mono/mini/mini-unwind.h @@ -12,6 +12,11 @@ #include "mini.h" +/* This is the same as mgreg_t, except on 32 bit bit platforms with callee saved fp regs */ +#ifndef mono_unwind_reg_t +#define mono_unwind_reg_t mgreg_t +#endif + /* * This is a platform-independent interface for unwinding through stack frames * based on the Dwarf unwinding interface. @@ -109,6 +114,8 @@ typedef struct { #define mono_add_unwind_op_same_value(op_list,code,buf,reg) do { (op_list) = g_slist_append ((op_list), mono_create_unwind_op ((code) - (buf), DW_CFA_same_value, (reg), 0)); } while (0) #define mono_add_unwind_op_offset(op_list,code,buf,reg,offset) do { (op_list) = g_slist_append ((op_list), mono_create_unwind_op ((code) - (buf), DW_CFA_offset, (reg), (offset))); } while (0) +#define mono_free_unwind_info(op_list) do { GSList *l; for (l = op_list; l; l = l->next) g_free (l->data); g_slist_free (op_list); op_list = NULL; } while (0) + /* Pointer Encoding in the .eh_frame */ enum { DW_EH_PE_absptr = 0x00, @@ -128,34 +135,37 @@ enum { }; int -mono_hw_reg_to_dwarf_reg (int reg) MONO_INTERNAL; +mono_hw_reg_to_dwarf_reg (int reg); int -mono_dwarf_reg_to_hw_reg (int reg) MONO_INTERNAL; +mono_dwarf_reg_to_hw_reg (int reg); int -mono_unwind_get_dwarf_data_align (void) MONO_INTERNAL; +mono_unwind_get_dwarf_data_align (void); int -mono_unwind_get_dwarf_pc_reg (void) MONO_INTERNAL; +mono_unwind_get_dwarf_pc_reg (void); + +guint8* +mono_unwind_ops_encode_full (GSList *unwind_ops, guint32 *out_len, gboolean enable_extensions); guint8* -mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len) MONO_INTERNAL; +mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len); void mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, guint8 *start_ip, guint8 *end_ip, guint8 *ip, guint8 **mark_locations, - mgreg_t *regs, int nregs, + mono_unwind_reg_t *regs, int nregs, mgreg_t **save_locations, int save_locations_len, - guint8 **out_cfa) MONO_INTERNAL; + guint8 **out_cfa); -void mono_unwind_init (void) MONO_INTERNAL; +void mono_unwind_init (void); -void mono_unwind_cleanup (void) MONO_INTERNAL; +void mono_unwind_cleanup (void); -guint32 mono_cache_unwind_info (guint8 *unwind_info, guint32 unwind_info_len) MONO_INTERNAL; +guint32 mono_cache_unwind_info (guint8 *unwind_info, guint32 unwind_info_len); -guint8* mono_get_cached_unwind_info (guint32 index, guint32 *unwind_info_len) MONO_INTERNAL; +guint8* mono_get_cached_unwind_info (guint32 index, guint32 *unwind_info_len); guint8* mono_unwind_decode_fde (guint8 *fde, guint32 *out_len, guint32 *code_len, MonoJitExceptionInfo **ex_info, guint32 *ex_info_len, gpointer **type_info, int *this_reg, int *this_offset) MONO_LLVM_INTERNAL; @@ -172,9 +182,9 @@ typedef struct { } MonoLLVMFDEInfo; void -mono_unwind_decode_llvm_mono_fde (guint8 *fde, int fde_len, guint8 *cie, guint8 *code, MonoLLVMFDEInfo *res) MONO_INTERNAL; +mono_unwind_decode_llvm_mono_fde (guint8 *fde, int fde_len, guint8 *cie, guint8 *code, MonoLLVMFDEInfo *res) MONO_LLVM_INTERNAL; -GSList* mono_unwind_get_cie_program (void) MONO_INTERNAL; +GSList* mono_unwind_get_cie_program (void); void mono_print_unwind_info (guint8 *unwind_info, int unwind_info_len) MONO_LLVM_INTERNAL;