123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- typedef enum
- {
- UNW_DYN_STOP = 0,
- UNW_DYN_SAVE_REG,
- UNW_DYN_SPILL_FP_REL,
- UNW_DYN_SPILL_SP_REL,
- UNW_DYN_ADD,
- UNW_DYN_POP_FRAMES,
- UNW_DYN_LABEL_STATE,
- UNW_DYN_COPY_STATE,
- UNW_DYN_ALIAS
- }
- unw_dyn_operation_t;
- typedef enum
- {
- UNW_INFO_FORMAT_DYNAMIC,
- UNW_INFO_FORMAT_TABLE,
- UNW_INFO_FORMAT_REMOTE_TABLE,
- UNW_INFO_FORMAT_ARM_EXIDX
- }
- unw_dyn_info_format_t;
- typedef struct unw_dyn_op
- {
- int8_t tag;
- int8_t qp;
- int16_t reg;
- int32_t when;
- unw_word_t val;
- }
- unw_dyn_op_t;
- typedef struct unw_dyn_region_info
- {
- struct unw_dyn_region_info *next;
- int32_t insn_count;
- uint32_t op_count;
- unw_dyn_op_t op[1];
- }
- unw_dyn_region_info_t;
- typedef struct unw_dyn_proc_info
- {
- unw_word_t name_ptr;
- unw_word_t handler;
- uint32_t flags;
- int32_t pad0;
- unw_dyn_region_info_t *regions;
- }
- unw_dyn_proc_info_t;
- typedef struct unw_dyn_table_info
- {
- unw_word_t name_ptr;
- unw_word_t segbase;
- unw_word_t table_len;
- unw_word_t *table_data;
- }
- unw_dyn_table_info_t;
- typedef struct unw_dyn_remote_table_info
- {
- unw_word_t name_ptr;
- unw_word_t segbase;
- unw_word_t table_len;
- unw_word_t table_data;
- }
- unw_dyn_remote_table_info_t;
- typedef struct unw_dyn_info
- {
-
- struct unw_dyn_info *next;
- struct unw_dyn_info *prev;
- unw_word_t start_ip;
- unw_word_t end_ip;
- unw_word_t gp;
- int32_t format;
- int32_t pad;
- union
- {
- unw_dyn_proc_info_t pi;
- unw_dyn_table_info_t ti;
- unw_dyn_remote_table_info_t rti;
- }
- u;
- }
- unw_dyn_info_t;
- typedef struct unw_dyn_info_list
- {
- uint32_t version;
- uint32_t generation;
- unw_dyn_info_t *first;
- }
- unw_dyn_info_list_t;
- ((char *) (((unw_dyn_region_info_t *) NULL)->op + (op_count)) \
- - (char *) NULL)
- /* Register the unwind info for a single procedure.
- This routine is NOT signal-safe. */
- extern void _U_dyn_register (unw_dyn_info_t *);
- /* Cancel the unwind info for a single procedure.
- This routine is NOT signal-safe. */
- extern void _U_dyn_cancel (unw_dyn_info_t *);
- /* Convenience routines. */
- #define _U_dyn_op(_tag, _qp, _when, _reg, _val) \
- ((unw_dyn_op_t) { (_tag), (_qp), (_reg), (_when), (_val) })
- #define _U_dyn_op_save_reg(op, qp, when, reg, dst) \
- (*(op) = _U_dyn_op (UNW_DYN_SAVE_REG, (qp), (when), (reg), (dst)))
- #define _U_dyn_op_spill_fp_rel(op, qp, when, reg, offset) \
- (*(op) = _U_dyn_op (UNW_DYN_SPILL_FP_REL, (qp), (when), (reg), \
- (offset)))
- #define _U_dyn_op_spill_sp_rel(op, qp, when, reg, offset) \
- (*(op) = _U_dyn_op (UNW_DYN_SPILL_SP_REL, (qp), (when), (reg), \
- (offset)))
- #define _U_dyn_op_add(op, qp, when, reg, value) \
- (*(op) = _U_dyn_op (UNW_DYN_ADD, (qp), (when), (reg), (value)))
- #define _U_dyn_op_pop_frames(op, qp, when, num_frames) \
- (*(op) = _U_dyn_op (UNW_DYN_POP_FRAMES, (qp), (when), 0, (num_frames)))
- #define _U_dyn_op_label_state(op, label) \
- (*(op) = _U_dyn_op (UNW_DYN_LABEL_STATE, _U_QP_TRUE, -1, 0, (label)))
- #define _U_dyn_op_copy_state(op, label) \
- (*(op) = _U_dyn_op (UNW_DYN_COPY_STATE, _U_QP_TRUE, -1, 0, (label)))
- #define _U_dyn_op_alias(op, qp, when, addr) \
- (*(op) = _U_dyn_op (UNW_DYN_ALIAS, (qp), (when), 0, (addr)))
- #define _U_dyn_op_stop(op) \
- (*(op) = _U_dyn_op (UNW_DYN_STOP, _U_QP_TRUE, -1, 0, 0))
- /* The target-dependent qualifying predicate which is always TRUE. On
- IA-64, that's p0 (0), on non-predicated architectures, the value is
- ignored. */
- #define _U_QP_TRUE _U_TDEP_QP_TRUE
|