Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Enumerations | Functions | Variables
libunwind.h File Reference
#include <inttypes.h>
#include <ucontext.h>
#include <sys/types.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  unw_tdep_save_loc
struct  unw_dyn_remote_table_info
struct  unw_dyn_info
struct  unw_tdep_proc_info_t
struct  unw_cursor
struct  unw_proc_info
struct  unw_accessors
struct  unw_save_loc
union  unw_dyn_info.u
union  unw_save_loc.u

Defines

#define UNW_IP   UNW_X86_64_RIP
#define _XOPEN_SOURCE   /* needed for Mac OS X */
#define __USE_GNU
#define UNW_TARGET   x86_64
#define UNW_TARGET_X86_64   1
#define _U_TDEP_QP_TRUE   0 /* see libunwind-dynamic.h */
#define UNW_TDEP_CURSOR_LEN   127
#define UNW_TDEP_NUM_EH_REGS   2 /* eax and edx are exception args */
#define unw_tdep_getcontext(uc)   (getcontext (uc), 0)
#define UNW_INFO_FORMAT_TABLE   1
#define UNW_INFO_FORMAT_REMOTE_TABLE   2
#define UNW_VERSION_MAJOR   0
#define UNW_VERSION_MINOR   99
#define UNW_VERSION_EXTRA   0
#define UNW_VERSION_CODE(maj, min)   (((maj) << 16) | (min))
#define UNW_VERSION   UNW_VERSION_CODE(UNW_VERSION_MAJOR, UNW_VERSION_MINOR)
#define UNW_PASTE2(x, y)   x##y
#define UNW_PASTE(x, y)   UNW_PASTE2(x,y)
#define UNW_OBJ(fn)   UNW_PASTE(UNW_PREFIX, fn)
#define UNW_ARCH_OBJ(fn)   UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
#define UW_NO_SYNC
#define UNW_PREFIX   UNW_PASTE(UNW_PASTE(_UL,UNW_TARGET),_)
#define UNW_NUM_EH_REGS   UNW_TDEP_NUM_EH_REGS
#define unw_getcontext(uc)   unw_tdep_getcontext(uc)
#define unw_is_fpreg(r)   unw_tdep_is_fpreg(r)
#define UNW_PI_FLAG_FIRST_TDEP_BIT   16
#define unw_local_addr_space   UNW_OBJ(local_addr_space)
#define unw_create_addr_space   UNW_OBJ(create_addr_space)
#define unw_destroy_addr_space   UNW_OBJ(destroy_addr_space)
#define unw_get_accessors   UNW_ARCH_OBJ(get_accessors)
#define unw_init_local   UNW_OBJ(init_local)
#define unw_init_remote   UNW_OBJ(init_remote)
#define unw_step   UNW_OBJ(step)
#define unw_resume   UNW_OBJ(resume)
#define unw_get_proc_info   UNW_OBJ(get_proc_info)
#define unw_get_proc_info_by_ip   UNW_OBJ(get_proc_info_by_ip)
#define unw_get_reg   UNW_OBJ(get_reg)
#define unw_set_reg   UNW_OBJ(set_reg)
#define unw_get_fpreg   UNW_OBJ(get_fpreg)
#define unw_set_fpreg   UNW_OBJ(set_fpreg)
#define unw_get_save_loc   UNW_OBJ(get_save_loc)
#define unw_is_signal_frame   UNW_OBJ(is_signal_frame)
#define unw_get_proc_name   UNW_OBJ(get_proc_name)
#define unw_set_caching_policy   UNW_OBJ(set_caching_policy)
#define unw_regname   UNW_ARCH_OBJ(regname)
#define unw_flush_cache   UNW_ARCH_OBJ(flush_cache)
#define unw_strerror   UNW_ARCH_OBJ(strerror)
#define unw_tdep_is_fpreg   UNW_ARCH_OBJ(is_fpreg)

Typedefs

typedef uint64_t unw_word_t
typedef int64_t unw_sword_t
typedef long double unw_tdep_fpreg_t
typedef struct unw_tdep_save_loc unw_tdep_save_loc_t
typedef ucontext_t unw_tdep_context_t
typedef struct
unw_dyn_remote_table_info 
unw_dyn_remote_table_info_t
typedef struct unw_dyn_info unw_dyn_info_t
typedef int unw_regnum_t
typedef struct unw_cursor unw_cursor_t
typedef unw_tdep_context_t unw_context_t
typedef unw_tdep_fpreg_t unw_fpreg_t
typedef struct unw_addr_spaceunw_addr_space_t
typedef struct unw_proc_info unw_proc_info_t
typedef struct unw_accessors unw_accessors_t
typedef enum unw_save_loc_type unw_save_loc_type_t
typedef struct unw_save_loc unw_save_loc_t

Enumerations

enum  x86_64_regnum_t {
  UNW_X86_64_RAX, UNW_X86_64_RDX, UNW_X86_64_RCX, UNW_X86_64_RBX,
  UNW_X86_64_RSI, UNW_X86_64_RDI, UNW_X86_64_RBP, UNW_X86_64_RSP,
  UNW_X86_64_R8, UNW_X86_64_R9, UNW_X86_64_R10, UNW_X86_64_R11,
  UNW_X86_64_R12, UNW_X86_64_R13, UNW_X86_64_R14, UNW_X86_64_R15,
  UNW_X86_64_RIP, UNW_X86_64_CFA, UNW_TDEP_LAST_REG = UNW_X86_64_RIP, UNW_TDEP_IP = UNW_X86_64_RIP,
  UNW_TDEP_SP = UNW_X86_64_RSP, UNW_TDEP_BP = UNW_X86_64_RBP, UNW_TDEP_EH = UNW_X86_64_RAX
}
enum  unw_error_t {
  UNW_ESUCCESS = 0, UNW_EUNSPEC, UNW_ENOMEM, UNW_EBADREG,
  UNW_EREADONLYREG, UNW_ESTOPUNWIND, UNW_EINVALIDIP, UNW_EBADFRAME,
  UNW_EINVAL, UNW_EBADVERSION, UNW_ENOINFO
}
enum  unw_frame_regnum_t { UNW_REG_IP = UNW_TDEP_IP, UNW_REG_SP = UNW_TDEP_SP, UNW_REG_EH = UNW_TDEP_EH, UNW_REG_LAST = UNW_TDEP_LAST_REG }
enum  unw_caching_policy_t { UNW_CACHE_NONE, UNW_CACHE_GLOBAL, UNW_CACHE_PER_THREAD }
enum  unw_save_loc_type { UNW_SLT_NONE, UNW_SLT_MEMORY, UNW_SLT_REG }

Functions

unw_addr_space_t unw_create_addr_space (unw_accessors_t *, int)
void unw_destroy_addr_space (unw_addr_space_t)
unw_accessors_tunw_get_accessors (unw_addr_space_t)
void unw_flush_cache (unw_addr_space_t, unw_word_t, unw_word_t)
int unw_set_caching_policy (unw_addr_space_t, unw_caching_policy_t)
const char * unw_regname (unw_regnum_t)
int unw_init_local (unw_cursor_t *, unw_context_t *)
int unw_init_remote (unw_cursor_t *, unw_addr_space_t, void *)
int unw_step (unw_cursor_t *)
int unw_resume (unw_cursor_t *)
int unw_get_proc_info (unw_cursor_t *, unw_proc_info_t *)
int unw_get_proc_info_by_ip (unw_addr_space_t, unw_word_t, unw_proc_info_t *, void *)
int unw_get_reg (unw_cursor_t *, int, unw_word_t *)
int unw_set_reg (unw_cursor_t *, int, unw_word_t)
int unw_get_fpreg (unw_cursor_t *, int, unw_fpreg_t *)
int unw_set_fpreg (unw_cursor_t *, int, unw_fpreg_t)
int unw_get_save_loc (unw_cursor_t *, int, unw_save_loc_t *)
int unw_is_signal_frame (unw_cursor_t *)
int unw_get_proc_name (unw_cursor_t *, char *, size_t, unw_word_t *)
unw_word_t unw_get_ip (unw_cursor_t *)
unw_word_t unw_get_frame_pointer (unw_cursor_t *)
const char * unw_strerror (int)
void unw_manual_step (unw_cursor_t *_c, void *ip_addr, void *bp_addr, void *sp_addr, void *bx_addr, void *r12_addr, void *r13_addr)
int unw_reset_bad_ptr_flag ()
void unw_set_safe_pointer_range (unw_word_t s, unw_word_t e)
int unw_tdep_is_fpreg (int)

Variables

unw_addr_space_t unw_local_addr_space

Class Documentation

struct unw_tdep_save_loc

Definition at line 225 of file libunwind.h.

struct unw_dyn_remote_table_info

Definition at line 241 of file libunwind.h.

Class Members
unw_word_t name_ptr
unw_word_t segbase
unw_word_t table_data
unw_word_t table_len
struct unw_dyn_info

Definition at line 250 of file libunwind.h.

Collaboration diagram for unw_dyn_info:
Class Members
unw_word_t end_ip
int32_t format
unw_word_t gp
struct unw_dyn_info * next
int32_t pad
struct unw_dyn_info * prev
unw_word_t start_ip
union unw_dyn_info u
struct unw_tdep_proc_info_t

Definition at line 271 of file libunwind.h.

struct unw_cursor

Definition at line 346 of file libunwind.h.

Class Members
unw_word_t opaque
struct unw_proc_info

Definition at line 374 of file libunwind.h.

Collaboration diagram for unw_proc_info:
Class Members
unw_word_t end_ip
unw_tdep_proc_info_t extra
unw_word_t flags
int format
unw_word_t gp
unw_word_t handler
unw_word_t lsda
unw_word_t start_ip
void * unwind_info
int unwind_info_size
struct unw_accessors

Definition at line 393 of file libunwind.h.

struct unw_save_loc

Definition at line 407 of file libunwind.h.

Collaboration diagram for unw_save_loc:
Class Members
unw_tdep_save_loc_t extra
unw_save_loc_type_t type
union unw_save_loc u
union unw_dyn_info.u

Definition at line 260 of file libunwind.h.

Class Members
unw_dyn_remote_table_info_t rti
union unw_save_loc.u

Definition at line 410 of file libunwind.h.

Class Members
unw_word_t addr
unw_regnum_t regnum

Define Documentation

#define __USE_GNU

Definition at line 48 of file libunwind.h.

#define _U_TDEP_QP_TRUE   0 /* see libunwind-dynamic.h */

Definition at line 171 of file libunwind.h.

#define _XOPEN_SOURCE   /* needed for Mac OS X */

Definition at line 47 of file libunwind.h.

#define UNW_ARCH_OBJ (   fn)    UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)

Definition at line 287 of file libunwind.h.

#define unw_create_addr_space   UNW_OBJ(create_addr_space)

Definition at line 423 of file libunwind.h.

#define unw_destroy_addr_space   UNW_OBJ(destroy_addr_space)

Definition at line 424 of file libunwind.h.

#define unw_flush_cache   UNW_ARCH_OBJ(flush_cache)

Definition at line 441 of file libunwind.h.

#define unw_get_accessors   UNW_ARCH_OBJ(get_accessors)

Definition at line 425 of file libunwind.h.

#define unw_get_fpreg   UNW_OBJ(get_fpreg)

Definition at line 434 of file libunwind.h.

#define unw_get_proc_info   UNW_OBJ(get_proc_info)

Definition at line 430 of file libunwind.h.

#define unw_get_proc_info_by_ip   UNW_OBJ(get_proc_info_by_ip)

Definition at line 431 of file libunwind.h.

Definition at line 438 of file libunwind.h.

#define unw_get_reg   UNW_OBJ(get_reg)

Definition at line 432 of file libunwind.h.

#define unw_get_save_loc   UNW_OBJ(get_save_loc)

Definition at line 436 of file libunwind.h.

#define unw_getcontext (   uc)    unw_tdep_getcontext(uc)

Definition at line 359 of file libunwind.h.

Definition at line 269 of file libunwind.h.

#define UNW_INFO_FORMAT_TABLE   1

Definition at line 268 of file libunwind.h.

#define unw_init_local   UNW_OBJ(init_local)

Definition at line 426 of file libunwind.h.

#define unw_init_remote   UNW_OBJ(init_remote)

Definition at line 427 of file libunwind.h.

#define UNW_IP   UNW_X86_64_RIP

Definition at line 39 of file libunwind.h.

#define unw_is_fpreg (   r)    unw_tdep_is_fpreg(r)

Definition at line 364 of file libunwind.h.

#define unw_is_signal_frame   UNW_OBJ(is_signal_frame)

Definition at line 437 of file libunwind.h.

#define unw_local_addr_space   UNW_OBJ(local_addr_space)

Definition at line 422 of file libunwind.h.

Definition at line 330 of file libunwind.h.

#define UNW_OBJ (   fn)    UNW_PASTE(UNW_PREFIX, fn)

Definition at line 286 of file libunwind.h.

#define UNW_PASTE (   x,
  y 
)    UNW_PASTE2(x,y)

Definition at line 285 of file libunwind.h.

#define UNW_PASTE2 (   x,
  y 
)    x##y

Definition at line 284 of file libunwind.h.

#define UNW_PI_FLAG_FIRST_TDEP_BIT   16

Definition at line 372 of file libunwind.h.

Definition at line 293 of file libunwind.h.

#define unw_regname   UNW_ARCH_OBJ(regname)

Definition at line 440 of file libunwind.h.

#define unw_resume   UNW_OBJ(resume)

Definition at line 429 of file libunwind.h.

#define unw_set_caching_policy   UNW_OBJ(set_caching_policy)

Definition at line 439 of file libunwind.h.

#define unw_set_fpreg   UNW_OBJ(set_fpreg)

Definition at line 435 of file libunwind.h.

#define unw_set_reg   UNW_OBJ(set_reg)

Definition at line 433 of file libunwind.h.

#define unw_step   UNW_OBJ(step)

Definition at line 428 of file libunwind.h.

#define unw_strerror   UNW_ARCH_OBJ(strerror)

Definition at line 442 of file libunwind.h.

#define UNW_TARGET   x86_64

Definition at line 168 of file libunwind.h.

#define UNW_TARGET_X86_64   1

Definition at line 169 of file libunwind.h.

#define UNW_TDEP_CURSOR_LEN   127

Definition at line 178 of file libunwind.h.

#define unw_tdep_getcontext (   uc)    (getcontext (uc), 0)

Definition at line 238 of file libunwind.h.

#define unw_tdep_is_fpreg   UNW_ARCH_OBJ(is_fpreg)

Definition at line 482 of file libunwind.h.

#define UNW_TDEP_NUM_EH_REGS   2 /* eax and edx are exception args */

Definition at line 223 of file libunwind.h.

Definition at line 282 of file libunwind.h.

#define UNW_VERSION_CODE (   maj,
  min 
)    (((maj) << 16) | (min))

Definition at line 281 of file libunwind.h.

#define UNW_VERSION_EXTRA   0

Definition at line 279 of file libunwind.h.

#define UNW_VERSION_MAJOR   0

Definition at line 277 of file libunwind.h.

#define UNW_VERSION_MINOR   99

Definition at line 278 of file libunwind.h.

#define UW_NO_SYNC

Definition at line 289 of file libunwind.h.


Typedef Documentation

Definition at line 368 of file libunwind.h.

Definition at line 353 of file libunwind.h.

Definition at line 366 of file libunwind.h.

typedef int unw_regnum_t

Definition at line 340 of file libunwind.h.

typedef int64_t unw_sword_t

Definition at line 181 of file libunwind.h.

typedef ucontext_t unw_tdep_context_t

Definition at line 232 of file libunwind.h.

typedef long double unw_tdep_fpreg_t

Definition at line 183 of file libunwind.h.

typedef uint64_t unw_word_t

Definition at line 180 of file libunwind.h.


Enumeration Type Documentation

Enumerator:
UNW_CACHE_NONE 
UNW_CACHE_GLOBAL 
UNW_CACHE_PER_THREAD 

Definition at line 332 of file libunwind.h.

  {
    UNW_CACHE_NONE,                /* no caching */
    UNW_CACHE_GLOBAL,                     /* shared global cache */
    UNW_CACHE_PER_THREAD           /* per-thread caching */
  }
Enumerator:
UNW_ESUCCESS 
UNW_EUNSPEC 
UNW_ENOMEM 
UNW_EBADREG 
UNW_EREADONLYREG 
UNW_ESTOPUNWIND 
UNW_EINVALIDIP 
UNW_EBADFRAME 
UNW_EINVAL 
UNW_EBADVERSION 
UNW_ENOINFO 

Definition at line 297 of file libunwind.h.

  {
    UNW_ESUCCESS = 0,              /* no error */
    UNW_EUNSPEC,            /* unspecified (general) error */
    UNW_ENOMEM,                    /* out of memory */
    UNW_EBADREG,            /* bad register number */
    UNW_EREADONLYREG,              /* attempt to write read-only register */
    UNW_ESTOPUNWIND,        /* stop unwinding */
    UNW_EINVALIDIP,         /* invalid IP */
    UNW_EBADFRAME,          /* bad frame */
    UNW_EINVAL,                    /* unsupported operation or bad value */
    UNW_EBADVERSION,        /* unwind info has unsupported version */
    UNW_ENOINFO                    /* no unwind info found */
  }
Enumerator:
UNW_REG_IP 
UNW_REG_SP 
UNW_REG_EH 
UNW_REG_LAST 

Definition at line 320 of file libunwind.h.

  {
    UNW_REG_IP = UNW_TDEP_IP,             /* (rw) instruction pointer (pc) */
    UNW_REG_SP = UNW_TDEP_SP,             /* (ro) stack pointer */
    UNW_REG_EH = UNW_TDEP_EH,             /* (rw) exception-handling reg base */
    UNW_REG_LAST = UNW_TDEP_LAST_REG
  }
Enumerator:
UNW_SLT_NONE 
UNW_SLT_MEMORY 
UNW_SLT_REG 

Definition at line 399 of file libunwind.h.

  {
    UNW_SLT_NONE,    /* register is not saved ("not an l-value") */
    UNW_SLT_MEMORY,  /* register has been saved in memory */
    UNW_SLT_REG             /* register has been saved in (another) register */
  }
Enumerator:
UNW_X86_64_RAX 
UNW_X86_64_RDX 
UNW_X86_64_RCX 
UNW_X86_64_RBX 
UNW_X86_64_RSI 
UNW_X86_64_RDI 
UNW_X86_64_RBP 
UNW_X86_64_RSP 
UNW_X86_64_R8 
UNW_X86_64_R9 
UNW_X86_64_R10 
UNW_X86_64_R11 
UNW_X86_64_R12 
UNW_X86_64_R13 
UNW_X86_64_R14 
UNW_X86_64_R15 
UNW_X86_64_RIP 
UNW_X86_64_CFA 
UNW_TDEP_LAST_REG 
UNW_TDEP_IP 
UNW_TDEP_SP 
UNW_TDEP_BP 
UNW_TDEP_EH 

Definition at line 185 of file libunwind.h.


Function Documentation

int unw_get_proc_name ( unw_cursor_t ,
char *  ,
size_t  ,
unw_word_t  
)
int unw_get_reg ( unw_cursor_t ,
int  ,
unw_word_t  
)
void unw_manual_step ( unw_cursor_t _c,
void ip_addr,
void bp_addr,
void sp_addr,
void bx_addr,
void r12_addr,
void r13_addr 
)
const char* unw_strerror ( int  )

Variable Documentation