Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Enumerations | Functions | Variables
libunwind_i.h File Reference
#include <sys/types.h>
#include <assert.h>
#include "libunwind.h"
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <link.h>

Go to the source code of this file.

Classes

struct  elf_image
struct  dwarf_loc
struct  dwarf_save_loc_t
struct  dwarf_reg_state
struct  dwarf_cie_info
struct  dwarf_state_record
struct  dwarf_cursor
struct  dwarf_rs_cache
struct  unw_addr_space
struct  cursor
union  dwarf_misaligned_value_t
struct  dwarf_eh_frame_hdr

Defines

#define __LITTLE_ENDIAN   1234
#define __BIG_ENDIAN   4321
#define __BYTE_ORDER   __LITTLE_ENDIAN
#define __BYTE_ORDER   __LITTLE_ENDIAN
#define ALWAYS_INLINE
#define UNUSED
#define NORETURN
#define ALIAS(name)
#define HIDDEN
#define PROTECTED
#define likely(x)   (x)
#define unlikely(x)   (x)
#define HIDDEN   static
#define ARRAY_SIZE(a)   (sizeof (a) / sizeof ((a)[0]))
#define mutex_init(l)   (pthread_mutex_init != 0 ? pthread_mutex_init ((l), 0) : 0)
#define mutex_lock(l)   (pthread_mutex_lock != 0 ? pthread_mutex_lock (l) : 0)
#define mutex_unlock(l)   (pthread_mutex_unlock != 0 ? pthread_mutex_unlock (l) : 0)
#define atomic_read(ptr)   (*(ptr))
#define UNWI_OBJ(fn)   UNW_PASTE(UNW_PREFIX,UNW_PASTE(I,fn))
#define UNWI_ARCH_OBJ(fn)   UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)
#define unwi_full_mask   UNWI_ARCH_OBJ(full_mask)
#define define_lock(name)   pthread_mutex_t name = PTHREAD_MUTEX_INITIALIZER
#define lock_init(l)   mutex_init (l)
#define lock_acquire(l, m)
#define lock_release(l, m)
#define GET_MEMORY(mem, size_in_bytes)
#define UNW_DEBUG   0
#define Debug(level, format...)
#define dprintf(format...)
#define mi_init   UNWI_ARCH_OBJ(mi_init)
#define __USE_GNU
#define elf_w(x)   elf64_ ## x
#define Elf_W(x)   ElfW(x)
#define DWARF_NUM_PRESERVED_REGS   17
#define DWARF_REGNUM_MAP_LENGTH   17
#define dwarf_is_big_endian(addr_space)   0
#define dwarf_to_cursor(c)   ((unw_cursor_t *) (c))
#define DWARF_CIE_VERSION   3 /* GCC emits version 1??? */
#define DWARF_CFA_OPCODE_MASK   0xc0
#define DWARF_CFA_OPERAND_MASK   0x3f
#define DW_EH_PE_FORMAT_MASK   0x0f /* format of the encoded value */
#define DW_EH_PE_APPL_MASK   0x70 /* how the value is to be applied */
#define DW_EH_PE_indirect   0x80
#define DW_EH_PE_omit   0xff
#define DW_EH_PE_ptr   0x00 /* pointer-sized unsigned value */
#define DW_EH_PE_uleb128   0x01 /* unsigned LE base-128 value */
#define DW_EH_PE_udata2   0x02 /* unsigned 16-bit value */
#define DW_EH_PE_udata4   0x03 /* unsigned 32-bit value */
#define DW_EH_PE_udata8   0x04 /* unsigned 64-bit value */
#define DW_EH_PE_sleb128   0x09 /* signed LE base-128 value */
#define DW_EH_PE_sdata2   0x0a /* signed 16-bit value */
#define DW_EH_PE_sdata4   0x0b /* signed 32-bit value */
#define DW_EH_PE_sdata8   0x0c /* signed 64-bit value */
#define DW_EH_PE_absptr   0x00 /* absolute value */
#define DW_EH_PE_pcrel   0x10 /* rel. to addr. of encoded value */
#define DW_EH_PE_textrel   0x20 /* text-relative (GCC-specific???) */
#define DW_EH_PE_datarel   0x30 /* data-relative */
#define DW_EH_PE_funcrel   0x40 /* start-of-procedure-relative */
#define DW_EH_PE_aligned   0x50 /* aligned pointer */
#define DWARF_CFA_REG_COLUMN   DWARF_NUM_PRESERVED_REGS
#define DWARF_CFA_OFF_COLUMN   (DWARF_NUM_PRESERVED_REGS + 1)
#define DWARF_LOG_UNW_CACHE_SIZE   7
#define DWARF_UNW_CACHE_SIZE   (1 << DWARF_LOG_UNW_CACHE_SIZE)
#define DWARF_LOG_UNW_HASH_SIZE   (DWARF_LOG_UNW_CACHE_SIZE + 1)
#define DWARF_UNW_HASH_SIZE   (1 << DWARF_LOG_UNW_HASH_SIZE)
#define dwarf_init   UNW_ARCH_OBJ (dwarf_init)
#define dwarf_find_proc_info   UNW_OBJ (dwarf_find_proc_info)
#define dwarf_search_unwind_table   UNW_OBJ (dwarf_search_unwind_table)
#define dwarf_put_unwind_info   UNW_OBJ (dwarf_put_unwind_info)
#define dwarf_put_unwind_info   UNW_OBJ (dwarf_put_unwind_info)
#define dwarf_eval_expr   UNW_OBJ (dwarf_eval_expr)
#define dwarf_extract_proc_info_from_fde   UNW_OBJ (dwarf_extract_proc_info_from_fde)
#define dwarf_find_save_locs   UNW_OBJ (dwarf_find_save_locs)
#define dwarf_create_state_record   UNW_OBJ (dwarf_create_state_record)
#define dwarf_make_proc_info   UNW_OBJ (dwarf_make_proc_info)
#define dwarf_read_encoded_pointer   UNW_OBJ (dwarf_read_encoded_pointer)
#define dwarf_step   UNW_OBJ (dwarf_step)
#define DWARF_GET_LOC(l)   ((l).val)
#define DWARF_NULL_LOC   DWARF_LOC (0, 0)
#define DWARF_IS_NULL_LOC(l)   (DWARF_GET_LOC (l) == 0)
#define DWARF_LOC(r, t)   ((dwarf_loc_t) { .val = (r) })
#define DWARF_IS_REG_LOC(l)   0
#define DWARF_REG_LOC(c, r)
#define DWARF_MEM_LOC(c, m)   DWARF_LOC ((m), 0)
#define DWARF_FPREG_LOC(c, r)
#define tdep_needs_initialization   UNW_OBJ(needs_initialization)
#define tdep_init   UNW_OBJ(init)
#define tdep_search_unwind_table   dwarf_search_unwind_table
#define tdep_uc_addr   UNW_ARCH_OBJ(uc_addr)
#define tdep_get_elf_image   UNW_ARCH_OBJ(get_elf_image)
#define tdep_access_reg   UNW_OBJ(access_reg)
#define tdep_access_fpreg   UNW_OBJ(access_fpreg)
#define tdep_find_proc_info(c, ip, n)
#define tdep_put_unwind_info(as, pi, arg)   dwarf_put_unwind_info((as), (pi), (arg))
#define tdep_get_as(c)   ((c)->dwarf.as)
#define tdep_get_as_arg(c)   ((c)->dwarf.as_arg)
#define tdep_get_ip(c)   ((c)->dwarf.ip)
#define tdep_get_cfa(c)   ((c)->dwarf.cfa)
#define tdep_big_endian(as)   0
#define dwarf_to_unw_regnum_map   UNW_OBJ (dwarf_to_unw_regnum_map)
#define DW_EH_VERSION   1 /* The version we're implementing */

Typedefs

typedef sigset_t intrmask_t
typedef int(* DL_Iter_Callback )(struct dl_phdr_info *info, size_t size, void *ptr)
typedef struct dwarf_loc dwarf_loc_t
typedef struct dwarf_reg_state dwarf_reg_state_t
typedef struct dwarf_cie_info dwarf_cie_info_t
typedef struct dwarf_state_record dwarf_state_record_t
typedef struct dwarf_cursor dwarf_cursor_t
typedef unsigned char unw_hash_index_t

Enumerations

enum  dwarf_expr_op_t {
  DW_OP_addr = 0x03, DW_OP_deref = 0x06, DW_OP_const1u = 0x08, DW_OP_const1s = 0x09,
  DW_OP_const2u = 0x0a, DW_OP_const2s = 0x0b, DW_OP_const4u = 0x0c, DW_OP_const4s = 0x0d,
  DW_OP_const8u = 0x0e, DW_OP_const8s = 0x0f, DW_OP_constu = 0x10, DW_OP_consts = 0x11,
  DW_OP_dup = 0x12, DW_OP_drop = 0x13, DW_OP_over = 0x14, DW_OP_pick = 0x15,
  DW_OP_swap = 0x16, DW_OP_rot = 0x17, DW_OP_xderef = 0x18, DW_OP_abs = 0x19,
  DW_OP_and = 0x1a, DW_OP_div = 0x1b, DW_OP_minus = 0x1c, DW_OP_mod = 0x1d,
  DW_OP_mul = 0x1e, DW_OP_neg = 0x1f, DW_OP_not = 0x20, DW_OP_or = 0x21,
  DW_OP_plus = 0x22, DW_OP_plus_uconst = 0x23, DW_OP_shl = 0x24, DW_OP_shr = 0x25,
  DW_OP_shra = 0x26, DW_OP_xor = 0x27, DW_OP_skip = 0x2f, DW_OP_bra = 0x28,
  DW_OP_eq = 0x29, DW_OP_ge = 0x2a, DW_OP_gt = 0x2b, DW_OP_le = 0x2c,
  DW_OP_lt = 0x2d, DW_OP_ne = 0x2e, DW_OP_lit0 = 0x30, DW_OP_lit1,
  DW_OP_lit2, DW_OP_lit3, DW_OP_lit4, DW_OP_lit5,
  DW_OP_lit6, DW_OP_lit7, DW_OP_lit8, DW_OP_lit9,
  DW_OP_lit10, DW_OP_lit11, DW_OP_lit12, DW_OP_lit13,
  DW_OP_lit14, DW_OP_lit15, DW_OP_lit16, DW_OP_lit17,
  DW_OP_lit18, DW_OP_lit19, DW_OP_lit20, DW_OP_lit21,
  DW_OP_lit22, DW_OP_lit23, DW_OP_lit24, DW_OP_lit25,
  DW_OP_lit26, DW_OP_lit27, DW_OP_lit28, DW_OP_lit29,
  DW_OP_lit30, DW_OP_lit31, DW_OP_reg0 = 0x50, DW_OP_reg1,
  DW_OP_reg2, DW_OP_reg3, DW_OP_reg4, DW_OP_reg5,
  DW_OP_reg6, DW_OP_reg7, DW_OP_reg8, DW_OP_reg9,
  DW_OP_reg10, DW_OP_reg11, DW_OP_reg12, DW_OP_reg13,
  DW_OP_reg14, DW_OP_reg15, DW_OP_reg16, DW_OP_reg17,
  DW_OP_reg18, DW_OP_reg19, DW_OP_reg20, DW_OP_reg21,
  DW_OP_reg22, DW_OP_reg23, DW_OP_reg24, DW_OP_reg25,
  DW_OP_reg26, DW_OP_reg27, DW_OP_reg28, DW_OP_reg29,
  DW_OP_reg30, DW_OP_reg31, DW_OP_breg0 = 0x70, DW_OP_breg1,
  DW_OP_breg2, DW_OP_breg3, DW_OP_breg4, DW_OP_breg5,
  DW_OP_breg6, DW_OP_breg7, DW_OP_breg8, DW_OP_breg9,
  DW_OP_breg10, DW_OP_breg11, DW_OP_breg12, DW_OP_breg13,
  DW_OP_breg14, DW_OP_breg15, DW_OP_breg16, DW_OP_breg17,
  DW_OP_breg18, DW_OP_breg19, DW_OP_breg20, DW_OP_breg21,
  DW_OP_breg22, DW_OP_breg23, DW_OP_breg24, DW_OP_breg25,
  DW_OP_breg26, DW_OP_breg27, DW_OP_breg28, DW_OP_breg29,
  DW_OP_breg30, DW_OP_breg31, DW_OP_regx = 0x90, DW_OP_fbreg = 0x91,
  DW_OP_bregx = 0x92, DW_OP_piece = 0x93, DW_OP_deref_size = 0x94, DW_OP_xderef_size = 0x95,
  DW_OP_nop = 0x96, DW_OP_push_object_address = 0x97, DW_OP_call2 = 0x98, DW_OP_call4 = 0x99,
  DW_OP_call_ref = 0x9a, DW_OP_lo_user = 0xe0, DW_OP_hi_user = 0xff
}
enum  dwarf_cfa_t {
  DW_CFA_advance_loc = 0x40, DW_CFA_offset = 0x80, DW_CFA_restore = 0xc0, DW_CFA_nop = 0x00,
  DW_CFA_set_loc = 0x01, DW_CFA_advance_loc1 = 0x02, DW_CFA_advance_loc2 = 0x03, DW_CFA_advance_loc4 = 0x04,
  DW_CFA_offset_extended = 0x05, DW_CFA_restore_extended = 0x06, DW_CFA_undefined = 0x07, DW_CFA_same_value = 0x08,
  DW_CFA_register = 0x09, DW_CFA_remember_state = 0x0a, DW_CFA_restore_state = 0x0b, DW_CFA_def_cfa = 0x0c,
  DW_CFA_def_cfa_register = 0x0d, DW_CFA_def_cfa_offset = 0x0e, DW_CFA_def_cfa_expression = 0x0f, DW_CFA_expression = 0x10,
  DW_CFA_offset_extended_sf = 0x11, DW_CFA_def_cfa_sf = 0x12, DW_CFA_def_cfa_offset_sf = 0x13, DW_CFA_lo_user = 0x1c,
  DW_CFA_MIPS_advance_loc8 = 0x1d, DW_CFA_GNU_window_save = 0x2d, DW_CFA_GNU_args_size = 0x2e, DW_CFA_GNU_negative_offset_extended = 0x2f,
  DW_CFA_hi_user = 0x3c
}
enum  dwarf_where_t {
  DWARF_WHERE_UNDEF, DWARF_WHERE_SAME, DWARF_WHERE_CFAREL, DWARF_WHERE_REG,
  DWARF_WHERE_EXPR
}

Functions

static ALWAYS_INLINE void print_error (const char *string)
void mi_init (void)
unw_word_t _U_dyn_info_list_addr (void)
int elf_w() get_proc_name (pid_t pid, unw_word_t ip, char *buf, size_t len, unw_word_t *offp)
HIDDEN int dwarf_find_proc_info (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, int need_unwind_info, void *arg)
HIDDEN int dwarf_search_unwind_table (unw_addr_space_t as, unw_word_t ip, unw_dyn_info_t *di, unw_proc_info_t *pi, int need_unwind_info, void *arg)
HIDDEN int dwarf_eval_expr (struct dwarf_cursor *c, unw_word_t *addr, unw_word_t len, unw_word_t *valp, int *is_register)
HIDDEN int dwarf_extract_proc_info_from_fde (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *fde_addr, unw_proc_info_t *pi, int need_unwind_info, void *arg)
HIDDEN int dwarf_find_save_locs (struct dwarf_cursor *c)
HIDDEN int dwarf_read_encoded_pointer (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, unsigned char encoding, const unw_proc_info_t *pi, unw_word_t *valp, void *arg)
HIDDEN int dwarf_step (struct dwarf_cursor *c)
static voidsafe_pointer (unw_word_t)
static int dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
static int dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
static int dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
static int dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
void tdep_init (void)
int tdep_search_unwind_table (unw_addr_space_t as, unw_word_t ip, unw_dyn_info_t *di, unw_proc_info_t *pi, int need_unwind_info, void *arg)
voidtdep_uc_addr (ucontext_t *uc, int reg)
int tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip, unsigned long *segbase, unsigned long *mapoff)
int tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp, int write)
int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, unw_fpreg_t *valp, int write)
HIDDEN int dwarf_to_unw_regnum (int reg)
static int dwarf_reads8 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, int8_t *val, void *arg)
static int dwarf_reads16 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, int16_t *val, void *arg)
static int dwarf_reads32 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, int32_t *val, void *arg)
static int dwarf_reads64 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, int64_t *val, void *arg)
static int dwarf_readu8 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, uint8_t *val, void *arg)
static int dwarf_readu16 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, uint16_t *val, void *arg)
static int dwarf_readu32 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, uint32_t *val, void *arg)
static int dwarf_readu64 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, uint64_t *val, void *arg)
static int dwarf_readw (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, unw_word_t *val, void *arg)
static int dwarf_read_uleb128 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, unw_word_t *valp, void *arg)
static int dwarf_read_sleb128 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, unw_word_t *valp, void *arg)
static ALWAYS_INLINE int dwarf_read_encoded_pointer_inlined (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, unsigned char encoding, const unw_proc_info_t *pi, unw_word_t *valp, void *arg)

Variables

intrmask_t unwi_full_mask
int tdep_needs_initialization

Class Documentation

struct elf_image

Definition at line 231 of file libunwind_i.h.

Class Members
void * image
size_t size
struct dwarf_loc

Definition at line 323 of file libunwind_i.h.

Class Members
unw_word_t val
struct dwarf_save_loc_t

Definition at line 504 of file libunwind_i.h.

Class Members
unw_word_t val
dwarf_where_t where
struct dwarf_reg_state

Definition at line 524 of file libunwind_i.h.

Collaboration diagram for dwarf_reg_state:
Class Members
unsigned short coll_chain
unsigned short hint
unw_word_t ip
unsigned short lru_chain
struct dwarf_reg_state * next
dwarf_save_loc_t reg
unw_word_t ret_addr_column
struct dwarf_cie_info

Definition at line 536 of file libunwind_i.h.

Class Members
uint16_t abi
unw_word_t cie_instr_end
unw_word_t cie_instr_start
unw_word_t code_align
unw_word_t data_align
uint8_t fde_encoding
unw_word_t fde_instr_end
unw_word_t fde_instr_start
unw_word_t handler
unsigned int have_abi_marker: 1
uint8_t lsda_encoding
unw_word_t ret_addr_column
unsigned int sized_augmentation: 1
uint16_t tag
struct dwarf_state_record

Definition at line 555 of file libunwind_i.h.

Collaboration diagram for dwarf_state_record:
Class Members
unw_word_t args_size
unsigned char fde_encoding
dwarf_reg_state_t rs_current
dwarf_reg_state_t rs_initial
struct dwarf_cursor

Definition at line 565 of file libunwind_i.h.

Collaboration diagram for dwarf_cursor:
Class Members
unw_word_t args_size
unw_addr_space_t as
void * as_arg
unw_word_t cfa
unw_word_t eh_args
unsigned int eh_valid_mask
short hint
unw_word_t ip
dwarf_loc_t loc
unw_proc_info_t pi
unsigned int pi_valid:1
short prev_rs
unw_word_t ret_addr_column
struct dwarf_rs_cache

Definition at line 595 of file libunwind_i.h.

Collaboration diagram for dwarf_rs_cache:
Class Members
dwarf_reg_state_t buckets
uint32_t generation
unsigned short hash
unsigned short lru_head
unsigned short lru_tail
struct unw_addr_space

Definition at line 652 of file libunwind_i.h.

Class Members
uint32_t cache_generation
unw_caching_policy_t caching_policy
union dwarf_misaligned_value_t

Definition at line 776 of file libunwind_i.h.

Class Members
void * ptr
int16_t s16
int32_t s32
int64_t s64
int8_t s8
uint16_t u16
uint32_t u32
uint64_t u64
uint8_t u8
unw_word_t w
struct dwarf_eh_frame_hdr

Definition at line 1161 of file libunwind_i.h.

Class Members
unsigned char eh_frame_ptr_enc
unsigned char fde_count_enc
unsigned char table_enc
unsigned char version

Define Documentation

#define __BIG_ENDIAN   4321

Definition at line 53 of file libunwind_i.h.

Definition at line 57 of file libunwind_i.h.

Definition at line 57 of file libunwind_i.h.

#define __LITTLE_ENDIAN   1234

Definition at line 52 of file libunwind_i.h.

#define __USE_GNU

Definition at line 284 of file libunwind_i.h.

#define ALIAS (   name)

Definition at line 83 of file libunwind_i.h.

#define ALWAYS_INLINE

Definition at line 80 of file libunwind_i.h.

#define ARRAY_SIZE (   a)    (sizeof (a) / sizeof ((a)[0]))

Definition at line 93 of file libunwind_i.h.

#define atomic_read (   ptr)    (*(ptr))

Definition at line 153 of file libunwind_i.h.

#define Debug (   level,
  format... 
)

Definition at line 214 of file libunwind_i.h.

#define define_lock (   name)    pthread_mutex_t name = PTHREAD_MUTEX_INITIALIZER

Definition at line 168 of file libunwind_i.h.

#define dprintf (   format...)

Definition at line 215 of file libunwind_i.h.

#define DW_EH_PE_absptr   0x00 /* absolute value */

Definition at line 484 of file libunwind_i.h.

#define DW_EH_PE_aligned   0x50 /* aligned pointer */

Definition at line 492 of file libunwind_i.h.

#define DW_EH_PE_APPL_MASK   0x70 /* how the value is to be applied */

Definition at line 466 of file libunwind_i.h.

#define DW_EH_PE_datarel   0x30 /* data-relative */

Definition at line 487 of file libunwind_i.h.

#define DW_EH_PE_FORMAT_MASK   0x0f /* format of the encoded value */

Definition at line 465 of file libunwind_i.h.

#define DW_EH_PE_funcrel   0x40 /* start-of-procedure-relative */

Definition at line 491 of file libunwind_i.h.

#define DW_EH_PE_indirect   0x80

Definition at line 469 of file libunwind_i.h.

#define DW_EH_PE_omit   0xff

Definition at line 472 of file libunwind_i.h.

#define DW_EH_PE_pcrel   0x10 /* rel. to addr. of encoded value */

Definition at line 485 of file libunwind_i.h.

#define DW_EH_PE_ptr   0x00 /* pointer-sized unsigned value */

Definition at line 473 of file libunwind_i.h.

#define DW_EH_PE_sdata2   0x0a /* signed 16-bit value */

Definition at line 479 of file libunwind_i.h.

#define DW_EH_PE_sdata4   0x0b /* signed 32-bit value */

Definition at line 480 of file libunwind_i.h.

#define DW_EH_PE_sdata8   0x0c /* signed 64-bit value */

Definition at line 481 of file libunwind_i.h.

#define DW_EH_PE_sleb128   0x09 /* signed LE base-128 value */

Definition at line 478 of file libunwind_i.h.

#define DW_EH_PE_textrel   0x20 /* text-relative (GCC-specific???) */

Definition at line 486 of file libunwind_i.h.

#define DW_EH_PE_udata2   0x02 /* unsigned 16-bit value */

Definition at line 475 of file libunwind_i.h.

#define DW_EH_PE_udata4   0x03 /* unsigned 32-bit value */

Definition at line 476 of file libunwind_i.h.

#define DW_EH_PE_udata8   0x04 /* unsigned 64-bit value */

Definition at line 477 of file libunwind_i.h.

#define DW_EH_PE_uleb128   0x01 /* unsigned LE base-128 value */

Definition at line 474 of file libunwind_i.h.

#define DW_EH_VERSION   1 /* The version we're implementing */

Definition at line 1159 of file libunwind_i.h.

Definition at line 522 of file libunwind_i.h.

#define DWARF_CFA_OPCODE_MASK   0xc0

Definition at line 417 of file libunwind_i.h.

#define DWARF_CFA_OPERAND_MASK   0x3f

Definition at line 418 of file libunwind_i.h.

Definition at line 521 of file libunwind_i.h.

#define DWARF_CIE_VERSION   3 /* GCC emits version 1??? */

Definition at line 415 of file libunwind_i.h.

Definition at line 619 of file libunwind_i.h.

Definition at line 615 of file libunwind_i.h.

Definition at line 616 of file libunwind_i.h.

Definition at line 611 of file libunwind_i.h.

Definition at line 618 of file libunwind_i.h.

#define DWARF_FPREG_LOC (   c,
 
)
Value:
(DWARF_LOC((unw_word_t)                        \
                             tdep_uc_addr((c)->as_arg, (r)), 0))

Definition at line 689 of file libunwind_i.h.

#define DWARF_GET_LOC (   l)    ((l).val)

Definition at line 680 of file libunwind_i.h.

Definition at line 610 of file libunwind_i.h.

#define dwarf_is_big_endian (   addr_space)    0

Definition at line 317 of file libunwind_i.h.

#define DWARF_IS_NULL_LOC (   l)    (DWARF_GET_LOC (l) == 0)

Definition at line 683 of file libunwind_i.h.

#define DWARF_IS_REG_LOC (   l)    0

Definition at line 685 of file libunwind_i.h.

#define DWARF_LOC (   r,
 
)    ((dwarf_loc_t) { .val = (r) })

Definition at line 684 of file libunwind_i.h.

#define DWARF_LOG_UNW_CACHE_SIZE   7

Definition at line 587 of file libunwind_i.h.

Definition at line 590 of file libunwind_i.h.

Definition at line 620 of file libunwind_i.h.

#define DWARF_MEM_LOC (   c,
 
)    DWARF_LOC ((m), 0)

Definition at line 688 of file libunwind_i.h.

#define DWARF_NULL_LOC   DWARF_LOC (0, 0)

Definition at line 682 of file libunwind_i.h.

#define DWARF_NUM_PRESERVED_REGS   17

Definition at line 308 of file libunwind_i.h.

Definition at line 614 of file libunwind_i.h.

Definition at line 614 of file libunwind_i.h.

Definition at line 621 of file libunwind_i.h.

#define DWARF_REG_LOC (   c,
 
)
Value:
(DWARF_LOC((unw_word_t)                        \
                             tdep_uc_addr((c)->as_arg, (r)), 0))

Definition at line 686 of file libunwind_i.h.

#define DWARF_REGNUM_MAP_LENGTH   17

Definition at line 313 of file libunwind_i.h.

Definition at line 612 of file libunwind_i.h.

#define dwarf_step   UNW_OBJ (dwarf_step)

Definition at line 622 of file libunwind_i.h.

#define dwarf_to_cursor (   c)    ((unw_cursor_t *) (c))

Definition at line 321 of file libunwind_i.h.

Definition at line 769 of file libunwind_i.h.

Definition at line 588 of file libunwind_i.h.

Definition at line 591 of file libunwind_i.h.

#define elf_w (   x)    elf64_ ## x

Definition at line 288 of file libunwind_i.h.

#define Elf_W (   x)    ElfW(x)

Definition at line 289 of file libunwind_i.h.

#define GET_MEMORY (   mem,
  size_in_bytes 
)
Value:
do {                                                               \
  /* Hopefully, mmap() goes straight through to a system call stub...  */   \
  mem = mmap (0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, \
             -1, 0);                                               \
  if (mem == MAP_FAILED)                                           \
    mem = NULL;                                                           \
} while (0)

Definition at line 182 of file libunwind_i.h.

#define HIDDEN

Definition at line 91 of file libunwind_i.h.

#define HIDDEN   static

Definition at line 91 of file libunwind_i.h.

#define likely (   x)    (x)

Definition at line 86 of file libunwind_i.h.

#define lock_acquire (   l,
 
)
Value:
do {                                             \
  sigprocmask (SIG_SETMASK, &unwi_full_mask, &(m));     \
  mutex_lock (l);                                \
} while (0)

Definition at line 171 of file libunwind_i.h.

#define lock_init (   l)    mutex_init (l)

Definition at line 170 of file libunwind_i.h.

#define lock_release (   l,
 
)
Value:
do {                                      \
  mutex_unlock (l);                       \
  sigprocmask (SIG_SETMASK, &(m), NULL);  \
} while (0)

Definition at line 176 of file libunwind_i.h.

#define mi_init   UNWI_ARCH_OBJ(mi_init)

Definition at line 224 of file libunwind_i.h.

#define mutex_init (   l)    (pthread_mutex_init != 0 ? pthread_mutex_init ((l), 0) : 0)

Definition at line 104 of file libunwind_i.h.

#define mutex_lock (   l)    (pthread_mutex_lock != 0 ? pthread_mutex_lock (l) : 0)

Definition at line 106 of file libunwind_i.h.

#define mutex_unlock (   l)    (pthread_mutex_unlock != 0 ? pthread_mutex_unlock (l) : 0)

Definition at line 108 of file libunwind_i.h.

#define NORETURN

Definition at line 82 of file libunwind_i.h.

#define PROTECTED

Definition at line 85 of file libunwind_i.h.

#define tdep_access_fpreg   UNW_OBJ(access_fpreg)

Definition at line 738 of file libunwind_i.h.

#define tdep_access_reg   UNW_OBJ(access_reg)

Definition at line 737 of file libunwind_i.h.

#define tdep_big_endian (   as)    0

Definition at line 750 of file libunwind_i.h.

#define tdep_find_proc_info (   c,
  ip,
 
)
Value:
dwarf_find_proc_info((c)->as, (ip), &(c)->pi, (n),      \
                                   (c)->as_arg)

Definition at line 740 of file libunwind_i.h.

#define tdep_get_as (   c)    ((c)->dwarf.as)

Definition at line 746 of file libunwind_i.h.

#define tdep_get_as_arg (   c)    ((c)->dwarf.as_arg)

Definition at line 747 of file libunwind_i.h.

#define tdep_get_cfa (   c)    ((c)->dwarf.cfa)

Definition at line 749 of file libunwind_i.h.

#define tdep_get_elf_image   UNW_ARCH_OBJ(get_elf_image)

Definition at line 736 of file libunwind_i.h.

#define tdep_get_ip (   c)    ((c)->dwarf.ip)

Definition at line 748 of file libunwind_i.h.

#define tdep_init   UNW_OBJ(init)

Definition at line 731 of file libunwind_i.h.

#define tdep_needs_initialization   UNW_OBJ(needs_initialization)

Definition at line 730 of file libunwind_i.h.

#define tdep_put_unwind_info (   as,
  pi,
  arg 
)    dwarf_put_unwind_info((as), (pi), (arg))

Definition at line 743 of file libunwind_i.h.

Definition at line 734 of file libunwind_i.h.

#define tdep_uc_addr   UNW_ARCH_OBJ(uc_addr)

Definition at line 735 of file libunwind_i.h.

#define unlikely (   x)    (x)

Definition at line 87 of file libunwind_i.h.

#define UNUSED

Definition at line 81 of file libunwind_i.h.

#define UNW_DEBUG   0

Definition at line 191 of file libunwind_i.h.

#define UNWI_ARCH_OBJ (   fn)    UNW_PASTE(UNW_PASTE(UNW_PASTE(_UI,UNW_TARGET),_), fn)

Definition at line 156 of file libunwind_i.h.

#define unwi_full_mask   UNWI_ARCH_OBJ(full_mask)

Definition at line 158 of file libunwind_i.h.

#define UNWI_OBJ (   fn)    UNW_PASTE(UNW_PREFIX,UNW_PASTE(I,fn))

Definition at line 155 of file libunwind_i.h.


Typedef Documentation

typedef int(* DL_Iter_Callback)(struct dl_phdr_info *info, size_t size, void *ptr)

Definition at line 291 of file libunwind_i.h.

typedef sigset_t intrmask_t

Definition at line 164 of file libunwind_i.h.

typedef unsigned char unw_hash_index_t

Definition at line 593 of file libunwind_i.h.


Enumeration Type Documentation

Enumerator:
DW_CFA_advance_loc 
DW_CFA_offset 
DW_CFA_restore 
DW_CFA_nop 
DW_CFA_set_loc 
DW_CFA_advance_loc1 
DW_CFA_advance_loc2 
DW_CFA_advance_loc4 
DW_CFA_offset_extended 
DW_CFA_restore_extended 
DW_CFA_undefined 
DW_CFA_same_value 
DW_CFA_register 
DW_CFA_remember_state 
DW_CFA_restore_state 
DW_CFA_def_cfa 
DW_CFA_def_cfa_register 
DW_CFA_def_cfa_offset 
DW_CFA_def_cfa_expression 
DW_CFA_expression 
DW_CFA_offset_extended_sf 
DW_CFA_def_cfa_sf 
DW_CFA_def_cfa_offset_sf 
DW_CFA_lo_user 
DW_CFA_MIPS_advance_loc8 
DW_CFA_GNU_window_save 
DW_CFA_GNU_args_size 
DW_CFA_GNU_negative_offset_extended 
DW_CFA_hi_user 

Definition at line 420 of file libunwind_i.h.

Enumerator:
DW_OP_addr 
DW_OP_deref 
DW_OP_const1u 
DW_OP_const1s 
DW_OP_const2u 
DW_OP_const2s 
DW_OP_const4u 
DW_OP_const4s 
DW_OP_const8u 
DW_OP_const8s 
DW_OP_constu 
DW_OP_consts 
DW_OP_dup 
DW_OP_drop 
DW_OP_over 
DW_OP_pick 
DW_OP_swap 
DW_OP_rot 
DW_OP_xderef 
DW_OP_abs 
DW_OP_and 
DW_OP_div 
DW_OP_minus 
DW_OP_mod 
DW_OP_mul 
DW_OP_neg 
DW_OP_not 
DW_OP_or 
DW_OP_plus 
DW_OP_plus_uconst 
DW_OP_shl 
DW_OP_shr 
DW_OP_shra 
DW_OP_xor 
DW_OP_skip 
DW_OP_bra 
DW_OP_eq 
DW_OP_ge 
DW_OP_gt 
DW_OP_le 
DW_OP_lt 
DW_OP_ne 
DW_OP_lit0 
DW_OP_lit1 
DW_OP_lit2 
DW_OP_lit3 
DW_OP_lit4 
DW_OP_lit5 
DW_OP_lit6 
DW_OP_lit7 
DW_OP_lit8 
DW_OP_lit9 
DW_OP_lit10 
DW_OP_lit11 
DW_OP_lit12 
DW_OP_lit13 
DW_OP_lit14 
DW_OP_lit15 
DW_OP_lit16 
DW_OP_lit17 
DW_OP_lit18 
DW_OP_lit19 
DW_OP_lit20 
DW_OP_lit21 
DW_OP_lit22 
DW_OP_lit23 
DW_OP_lit24 
DW_OP_lit25 
DW_OP_lit26 
DW_OP_lit27 
DW_OP_lit28 
DW_OP_lit29 
DW_OP_lit30 
DW_OP_lit31 
DW_OP_reg0 
DW_OP_reg1 
DW_OP_reg2 
DW_OP_reg3 
DW_OP_reg4 
DW_OP_reg5 
DW_OP_reg6 
DW_OP_reg7 
DW_OP_reg8 
DW_OP_reg9 
DW_OP_reg10 
DW_OP_reg11 
DW_OP_reg12 
DW_OP_reg13 
DW_OP_reg14 
DW_OP_reg15 
DW_OP_reg16 
DW_OP_reg17 
DW_OP_reg18 
DW_OP_reg19 
DW_OP_reg20 
DW_OP_reg21 
DW_OP_reg22 
DW_OP_reg23 
DW_OP_reg24 
DW_OP_reg25 
DW_OP_reg26 
DW_OP_reg27 
DW_OP_reg28 
DW_OP_reg29 
DW_OP_reg30 
DW_OP_reg31 
DW_OP_breg0 
DW_OP_breg1 
DW_OP_breg2 
DW_OP_breg3 
DW_OP_breg4 
DW_OP_breg5 
DW_OP_breg6 
DW_OP_breg7 
DW_OP_breg8 
DW_OP_breg9 
DW_OP_breg10 
DW_OP_breg11 
DW_OP_breg12 
DW_OP_breg13 
DW_OP_breg14 
DW_OP_breg15 
DW_OP_breg16 
DW_OP_breg17 
DW_OP_breg18 
DW_OP_breg19 
DW_OP_breg20 
DW_OP_breg21 
DW_OP_breg22 
DW_OP_breg23 
DW_OP_breg24 
DW_OP_breg25 
DW_OP_breg26 
DW_OP_breg27 
DW_OP_breg28 
DW_OP_breg29 
DW_OP_breg30 
DW_OP_breg31 
DW_OP_regx 
DW_OP_fbreg 
DW_OP_bregx 
DW_OP_piece 
DW_OP_deref_size 
DW_OP_xderef_size 
DW_OP_nop 
DW_OP_push_object_address 
DW_OP_call2 
DW_OP_call4 
DW_OP_call_ref 
DW_OP_lo_user 
DW_OP_hi_user 

Definition at line 331 of file libunwind_i.h.

  {
    DW_OP_addr                     = 0x03,
    DW_OP_deref                    = 0x06,
    DW_OP_const1u           = 0x08,
    DW_OP_const1s           = 0x09,
    DW_OP_const2u           = 0x0a,
    DW_OP_const2s           = 0x0b,
    DW_OP_const4u           = 0x0c,
    DW_OP_const4s           = 0x0d,
    DW_OP_const8u           = 0x0e,
    DW_OP_const8s           = 0x0f,
    DW_OP_constu            = 0x10,
    DW_OP_consts            = 0x11,
    DW_OP_dup               = 0x12,
    DW_OP_drop                     = 0x13,
    DW_OP_over                     = 0x14,
    DW_OP_pick                     = 0x15,
    DW_OP_swap                     = 0x16,
    DW_OP_rot               = 0x17,
    DW_OP_xderef            = 0x18,
    DW_OP_abs               = 0x19,
    DW_OP_and               = 0x1a,
    DW_OP_div               = 0x1b,
    DW_OP_minus                    = 0x1c,
    DW_OP_mod               = 0x1d,
    DW_OP_mul               = 0x1e,
    DW_OP_neg               = 0x1f,
    DW_OP_not               = 0x20,
    DW_OP_or                = 0x21,
    DW_OP_plus                     = 0x22,
    DW_OP_plus_uconst              = 0x23,
    DW_OP_shl               = 0x24,
    DW_OP_shr               = 0x25,
    DW_OP_shra                     = 0x26,
    DW_OP_xor               = 0x27,
    DW_OP_skip                     = 0x2f,
    DW_OP_bra               = 0x28,
    DW_OP_eq                = 0x29,
    DW_OP_ge                = 0x2a,
    DW_OP_gt                = 0x2b,
    DW_OP_le                = 0x2c,
    DW_OP_lt                = 0x2d,
    DW_OP_ne                = 0x2e,
    DW_OP_lit0                     = 0x30,
    DW_OP_lit1,  DW_OP_lit2,  DW_OP_lit3,  DW_OP_lit4,  DW_OP_lit5,
    DW_OP_lit6,  DW_OP_lit7,  DW_OP_lit8,  DW_OP_lit9,  DW_OP_lit10,
    DW_OP_lit11, DW_OP_lit12, DW_OP_lit13, DW_OP_lit14, DW_OP_lit15,
    DW_OP_lit16, DW_OP_lit17, DW_OP_lit18, DW_OP_lit19, DW_OP_lit20,
    DW_OP_lit21, DW_OP_lit22, DW_OP_lit23, DW_OP_lit24, DW_OP_lit25,
    DW_OP_lit26, DW_OP_lit27, DW_OP_lit28, DW_OP_lit29, DW_OP_lit30,
    DW_OP_lit31,
    DW_OP_reg0                     = 0x50,
    DW_OP_reg1,  DW_OP_reg2,  DW_OP_reg3,  DW_OP_reg4,  DW_OP_reg5,
    DW_OP_reg6,  DW_OP_reg7,  DW_OP_reg8,  DW_OP_reg9,  DW_OP_reg10,
    DW_OP_reg11, DW_OP_reg12, DW_OP_reg13, DW_OP_reg14, DW_OP_reg15,
    DW_OP_reg16, DW_OP_reg17, DW_OP_reg18, DW_OP_reg19, DW_OP_reg20,
    DW_OP_reg21, DW_OP_reg22, DW_OP_reg23, DW_OP_reg24, DW_OP_reg25,
    DW_OP_reg26, DW_OP_reg27, DW_OP_reg28, DW_OP_reg29, DW_OP_reg30,
    DW_OP_reg31,
    DW_OP_breg0                    = 0x70,
    DW_OP_breg1,  DW_OP_breg2,  DW_OP_breg3,  DW_OP_breg4,  DW_OP_breg5,
    DW_OP_breg6,  DW_OP_breg7,  DW_OP_breg8,  DW_OP_breg9,  DW_OP_breg10,
    DW_OP_breg11, DW_OP_breg12, DW_OP_breg13, DW_OP_breg14, DW_OP_breg15,
    DW_OP_breg16, DW_OP_breg17, DW_OP_breg18, DW_OP_breg19, DW_OP_breg20,
    DW_OP_breg21, DW_OP_breg22, DW_OP_breg23, DW_OP_breg24, DW_OP_breg25,
    DW_OP_breg26, DW_OP_breg27, DW_OP_breg28, DW_OP_breg29, DW_OP_breg30,
    DW_OP_breg31,
    DW_OP_regx                     = 0x90,
    DW_OP_fbreg                    = 0x91,
    DW_OP_bregx                    = 0x92,
    DW_OP_piece                    = 0x93,
    DW_OP_deref_size        = 0x94,
    DW_OP_xderef_size              = 0x95,
    DW_OP_nop               = 0x96,
    DW_OP_push_object_address      = 0x97,
    DW_OP_call2                    = 0x98,
    DW_OP_call4                    = 0x99,
    DW_OP_call_ref          = 0x9a,
    DW_OP_lo_user           = 0xe0,
    DW_OP_hi_user           = 0xff
  }
Enumerator:
DWARF_WHERE_UNDEF 
DWARF_WHERE_SAME 
DWARF_WHERE_CFAREL 
DWARF_WHERE_REG 
DWARF_WHERE_EXPR 

Definition at line 494 of file libunwind_i.h.

  {
    DWARF_WHERE_UNDEF,             /* register isn't saved at all */
    DWARF_WHERE_SAME,              /* register has same value as in prev. frame */
    DWARF_WHERE_CFAREL,            /* register saved at CFA-relative address */
    DWARF_WHERE_REG,        /* register saved in another register */
    DWARF_WHERE_EXPR,              /* register saved */
  }

Function Documentation

HIDDEN int dwarf_eval_expr ( struct dwarf_cursor c,
unw_word_t addr,
unw_word_t  len,
unw_word_t valp,
int is_register 
)
HIDDEN int dwarf_extract_proc_info_from_fde ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t fde_addr,
unw_proc_info_t pi,
int  need_unwind_info,
void arg 
)
HIDDEN int dwarf_find_proc_info ( unw_addr_space_t  as,
unw_word_t  ip,
unw_proc_info_t pi,
int  need_unwind_info,
void arg 
)
static int dwarf_get ( struct dwarf_cursor c,
dwarf_loc_t  loc,
unw_word_t val 
) [inline, static]

Definition at line 713 of file libunwind_i.h.

{
  if (!DWARF_GET_LOC (loc))
    return -1;
  *val = *(unw_word_t *) safe_pointer(DWARF_GET_LOC (loc));
  return 0;
}

Here is the call graph for this function:

static int dwarf_getfp ( struct dwarf_cursor c,
dwarf_loc_t  loc,
unw_fpreg_t val 
) [inline, static]

Definition at line 695 of file libunwind_i.h.

{
  if (!DWARF_GET_LOC (loc))
    return -1;
  *val = *(unw_fpreg_t *) safe_pointer(DWARF_GET_LOC (loc));
  return 0;
}

Here is the call graph for this function:

static int dwarf_put ( struct dwarf_cursor c,
dwarf_loc_t  loc,
unw_word_t  val 
) [inline, static]

Definition at line 722 of file libunwind_i.h.

{
  if (!DWARF_GET_LOC (loc))
    return -1;
  *(unw_word_t *) safe_pointer(DWARF_GET_LOC (loc)) = val;
  return 0;
}

Here is the call graph for this function:

static int dwarf_putfp ( struct dwarf_cursor c,
dwarf_loc_t  loc,
unw_fpreg_t  val 
) [inline, static]

Definition at line 704 of file libunwind_i.h.

{
  if (!DWARF_GET_LOC (loc))
    return -1;
  *(unw_fpreg_t *) safe_pointer(DWARF_GET_LOC (loc)) = val;
  return 0;
}

Here is the call graph for this function:

HIDDEN int dwarf_read_encoded_pointer ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
unsigned char  encoding,
const unw_proc_info_t pi,
unw_word_t valp,
void arg 
)
static ALWAYS_INLINE int dwarf_read_encoded_pointer_inlined ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
unsigned char  encoding,
const unw_proc_info_t pi,
unw_word_t valp,
void arg 
) [static]

Definition at line 945 of file libunwind_i.h.

{
  unw_word_t val, initial_addr = *addr;
  uint16_t uval16;
  uint32_t uval32;
  uint64_t uval64;
  int16_t sval16;
  int32_t sval32;
  int64_t sval64;
  int ret;

  /* DW_EH_PE_omit and DW_EH_PE_aligned don't follow the normal
     format/application encoding.  Handle them first.  */
  if (encoding == DW_EH_PE_omit)
    {
      *valp = 0;
      return 0;
    }
  else if (encoding == DW_EH_PE_aligned)
    {
      *addr = (initial_addr + sizeof (unw_word_t) - 1) & -sizeof (unw_word_t);
      return dwarf_readw (as, a, addr, valp, arg);
    }

  switch (encoding & DW_EH_PE_FORMAT_MASK)
    {
    case DW_EH_PE_ptr:
      if ((ret = dwarf_readw (as, a, addr, &val, arg)) < 0)
       return ret;
      break;

    case DW_EH_PE_uleb128:
      if ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0)
       return ret;
      break;

    case DW_EH_PE_udata2:
      if ((ret = dwarf_readu16 (as, a, addr, &uval16, arg)) < 0)
       return ret;
      val = uval16;
      break;

    case DW_EH_PE_udata4:
      if ((ret = dwarf_readu32 (as, a, addr, &uval32, arg)) < 0)
       return ret;
      val = uval32;
      break;

    case DW_EH_PE_udata8:
      if ((ret = dwarf_readu64 (as, a, addr, &uval64, arg)) < 0)
       return ret;
      val = uval64;
      break;

    case DW_EH_PE_sleb128:
      if ((ret = dwarf_read_uleb128 (as, a, addr, &val, arg)) < 0)
       return ret;
      break;

    case DW_EH_PE_sdata2:
      if ((ret = dwarf_reads16 (as, a, addr, &sval16, arg)) < 0)
       return ret;
      val = sval16;
      break;

    case DW_EH_PE_sdata4:
      if ((ret = dwarf_reads32 (as, a, addr, &sval32, arg)) < 0)
       return ret;
      val = sval32;
      break;

    case DW_EH_PE_sdata8:
      if ((ret = dwarf_reads64 (as, a, addr, &sval64, arg)) < 0)
       return ret;
      val = sval64;
      break;

    default:
      Debug (1, "unexpected encoding format 0x%x\n",
            encoding & DW_EH_PE_FORMAT_MASK);
      return -UNW_EINVAL;
    }

  if (val == 0)
    {
      /* 0 is a special value and always absolute.  */
      *valp = 0;
      return 0;
    }

  switch (encoding & DW_EH_PE_APPL_MASK)
    {
    case DW_EH_PE_absptr:
      break;

    case DW_EH_PE_pcrel:
      val += initial_addr;
      break;

    case DW_EH_PE_datarel:
      /* XXX For now, assume that data-relative addresses are relative
         to the global pointer.  */
      val += pi->gp;
      break;

    case DW_EH_PE_funcrel:
      val += pi->start_ip;
      break;

    case DW_EH_PE_textrel:
      /* XXX For now we don't support text-rel values.  If there is a
         platform which needs this, we probably would have to add a
         "segbase" member to unw_proc_info_t.  */
    default:
      Debug (1, "unexpected application type 0x%x\n",
            encoding & DW_EH_PE_APPL_MASK);
      return -UNW_EINVAL;
    }

  if (encoding & DW_EH_PE_indirect)
    {
      unw_word_t indirect_addr = val;

      if ((ret = dwarf_readw (as, a, &indirect_addr, &val, arg)) < 0)
       return ret;
    }

  *valp = val;
  return 0;
}

Here is the call graph for this function:

static int dwarf_read_sleb128 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
unw_word_t valp,
void arg 
) [inline, static]

Definition at line 919 of file libunwind_i.h.

{
  unw_word_t val = 0, shift = 0;
  unsigned char byte;
  int ret;

  do
    {
      if ((ret = dwarf_readu8 (as, a, addr, &byte, arg)) < 0)
       return ret;

      val |= ((unw_word_t) byte & 0x7f) << shift;
      shift += 7;
    }
  while (byte & 0x80);

  if (shift < 8 * sizeof (unw_word_t) && (byte & 0x40) != 0)
    /* sign-extend negative value */
    val |= ((unw_word_t) -1) << shift;

  *valp = val;
  return 0;
}

Here is the call graph for this function:

static int dwarf_read_uleb128 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
unw_word_t valp,
void arg 
) [inline, static]

Definition at line 894 of file libunwind_i.h.

{
  unw_word_t val = 0, shift = 0;
  unsigned char byte;
  int ret;

  do
    {
      if ((ret = dwarf_readu8 (as, a, addr, &byte, arg)) < 0)
       return ret;

      val |= ((unw_word_t) byte & 0x7f) << shift;
      shift += 7;
    }
  while (byte & 0x80);

  *valp = val;
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int dwarf_reads16 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
int16_t *  val,
void arg 
) [inline, static]

Definition at line 803 of file libunwind_i.h.

{
  dwarf_misaligned_value_t *mvp = (void *) *addr;

  *val = mvp->s16;
  *addr += sizeof (mvp->s16);
  return 0;
}

Here is the caller graph for this function:

static int dwarf_reads32 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
int32_t *  val,
void arg 
) [inline, static]

Definition at line 814 of file libunwind_i.h.

{
  dwarf_misaligned_value_t *mvp = (void *) *addr;

  *val = mvp->s32;
  *addr += sizeof (mvp->s32);
  return 0;
}

Here is the caller graph for this function:

static int dwarf_reads64 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
int64_t *  val,
void arg 
) [inline, static]

Definition at line 825 of file libunwind_i.h.

{
  dwarf_misaligned_value_t *mvp = (void *) *addr;

  *val = mvp->s64;
  *addr += sizeof (mvp->s64);
  return 0;
}

Here is the caller graph for this function:

static int dwarf_reads8 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
int8_t *  val,
void arg 
) [inline, static]

Definition at line 792 of file libunwind_i.h.

{
  dwarf_misaligned_value_t *mvp = (void *) *addr;

  *val = mvp->s8;
  *addr += sizeof (mvp->s8);
  return 0;
}
static int dwarf_readu16 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
uint16_t *  val,
void arg 
) [inline, static]

Definition at line 847 of file libunwind_i.h.

{
  dwarf_misaligned_value_t *mvp = (void *) *addr;

  *val = mvp->u16;
  *addr += sizeof (mvp->u16);
  return 0;
}

Here is the caller graph for this function:

static int dwarf_readu32 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
uint32_t *  val,
void arg 
) [inline, static]

Definition at line 858 of file libunwind_i.h.

{
  dwarf_misaligned_value_t *mvp = (void *) *addr;

  *val = mvp->u32;
  *addr += sizeof (mvp->u32);
  return 0;
}

Here is the caller graph for this function:

static int dwarf_readu64 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
uint64_t *  val,
void arg 
) [inline, static]

Definition at line 869 of file libunwind_i.h.

{
  dwarf_misaligned_value_t *mvp = (void *) *addr;

  *val = mvp->u64;
  *addr += sizeof (mvp->u64);
  return 0;
}

Here is the caller graph for this function:

static int dwarf_readu8 ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
uint8_t *  val,
void arg 
) [inline, static]

Definition at line 836 of file libunwind_i.h.

{
  dwarf_misaligned_value_t *mvp = (void *) *addr;

  *val = mvp->u8;
  *addr += sizeof (mvp->u8);
  return 0;
}

Here is the caller graph for this function:

static int dwarf_readw ( unw_addr_space_t  as,
unw_accessors_t a,
unw_word_t addr,
unw_word_t val,
void arg 
) [inline, static]

Definition at line 880 of file libunwind_i.h.

{
  dwarf_misaligned_value_t *mvp = (void *) *addr;

  *val = mvp->w;
  *addr += sizeof (mvp->w);
  return 0;
}

Here is the caller graph for this function:

HIDDEN int dwarf_search_unwind_table ( unw_addr_space_t  as,
unw_word_t  ip,
unw_dyn_info_t di,
unw_proc_info_t pi,
int  need_unwind_info,
void arg 
)
int elf_w() get_proc_name ( pid_t  pid,
unw_word_t  ip,
char *  buf,
size_t  len,
unw_word_t offp 
)
void mi_init ( void  )
static ALWAYS_INLINE void print_error ( const char *  string) [static]

Definition at line 219 of file libunwind_i.h.

{
  write (2, string, strlen (string));
}
static void* safe_pointer ( unw_word_t  ) [static]

Here is the caller graph for this function:

int tdep_access_fpreg ( struct cursor c,
unw_regnum_t  reg,
unw_fpreg_t valp,
int  write 
)
int tdep_access_reg ( struct cursor c,
unw_regnum_t  reg,
unw_word_t valp,
int  write 
)
int tdep_get_elf_image ( struct elf_image ei,
pid_t  pid,
unw_word_t  ip,
unsigned long *  segbase,
unsigned long *  mapoff 
)
int tdep_search_unwind_table ( unw_addr_space_t  as,
unw_word_t  ip,
unw_dyn_info_t di,
unw_proc_info_t pi,
int  need_unwind_info,
void arg 
)
void* tdep_uc_addr ( ucontext_t *  uc,
int  reg 
)

Variable Documentation