Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef __SYS_IA64_UNWIND_IA64_H
00047 #define __SYS_IA64_UNWIND_IA64_H
00048
00049 #include <inttypes.h>
00050
00051
00052 #define __UNW_VERSION 0x01
00053
00054
00055 #define __UNW_OK 0x00
00056 #define __UNW_INTERNAL_ERROR 0x01
00057 #define __UNW_MALLOC_ERROR 0x02
00058 #define __UNW_REALLOC_ERROR 0x03
00059 #define __UNW_MMAP_ERROR 0x04
00060 #define __UNW_SYSCALL_ERROR 0x05
00061 #define __UNW_NULL_ERROR 0x06
00062 #define __UNW_INV_ARG_ERROR 0x07
00063 #define __UNW_INV_SIZE_ERROR 0x08
00064 #define __UNW_INV_OP_ERROR 0x09
00065 #define __UNW_INV_ALIGNMENT_ERROR 0x0a
00066 #define __UNW_INV_VERSION_ERROR 0x0b
00067 #define __UNW_NOT_FOUND_ERROR 0x0c
00068
00069
00070 #ifdef _ABI32
00071 typedef uint32_t __unw_addr_t;
00072 #else
00073 typedef uint64_t __unw_addr_t;
00074 #endif
00075 typedef uint64_t __unw_dbl_word_t;
00076 typedef uint32_t __unw_word_t;
00077 typedef int32_t __unw_error_t;
00078
00079
00080 typedef struct __unw_table_entry_struct {
00081 __unw_addr_t _start;
00082 __unw_addr_t _end;
00083 __unw_addr_t _info;
00084 } __unw_table_entry_t;
00085
00086
00087 typedef struct __unw_info_struct {
00088 __unw_dbl_word_t _header;
00089 char _body[1];
00090 } __unw_info_t;
00091
00092
00093
00094 #define __UNW_IS_HEADER(x) (!((x) & 0x80))
00095
00096
00097 #define __UNW_IS_PROLOGUE_HEADER(x) ((0x00 == ((x) & 0xe0)) \
00098 || (0x40 == ((x) & 0xf8)) \
00099 || (0x60 == (x)))
00100
00101
00102 #define __UNW_IS_BODY_HEADER(x) ((0x20 == ((x) & 0xe0)) \
00103 || (0x61 == (x)))
00104
00105
00106 #define __UNW_IS_R1(x) (0x00 == ((x) & 0xc0))
00107 #define __UNW_IS_R2(x) (0x40 == ((x) & 0xe0))
00108 #define __UNW_IS_R3(x) (0x60 == ((x) & 0xe0))
00109 #define __UNW_IS_P1(x) (0x80 == ((x) & 0xe0))
00110 #define __UNW_IS_P2(x) (0xa0 == ((x) & 0xf0))
00111 #define __UNW_IS_P3(x) (0xb0 == ((x) & 0xf8))
00112 #define __UNW_IS_P4(x) (0xb8 == ((x) & 0xff))
00113 #define __UNW_IS_P5(x) (0xb9 == ((x) & 0xff))
00114 #define __UNW_IS_P6(x) (0xc0 == ((x) & 0xe0))
00115 #define __UNW_IS_P7(x) (0xe0 == ((x) & 0xf0))
00116 #define __UNW_IS_P8(x) (0xf0 == ((x) & 0xff))
00117 #define __UNW_IS_P9(x) (0xf1 == ((x) & 0xff))
00118 #define __UNW_IS_P10(x) (0xff == ((x) & 0xff))
00119 #define __UNW_IS_B1(x) (0x80 == ((x) & 0xc0))
00120 #define __UNW_IS_B2(x) (0xc0 == ((x) & 0xe0))
00121 #define __UNW_IS_B3(x) (0xe0 == ((x) & 0xff))
00122 #define __UNW_IS_B4(x) (0xf0 == ((x) & 0xf7))
00123 #define __UNW_IS_X1(x) (0xf9 == ((x) & 0xff))
00124 #define __UNW_IS_X2(x) (0xfa == ((x) & 0xff))
00125 #define __UNW_IS_X3(x) (0xfb == ((x) & 0xff))
00126 #define __UNW_IS_X4(x) (0xfc == ((x) & 0xff))
00127
00128
00129 #define __UNW_VER(x) ((x) >> 48)
00130 #define __UNW_FLAG_EHANDLER(x) ((x) & 0x0000000100000000L)
00131 #define __UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
00132 #define __UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
00133
00134
00135
00136 #ifdef __cplusplus
00137 extern "C" {
00138 #endif
00139
00140
00141
00142
00143 uint64_t __leb128_decode(char *, uint64_t, uint64_t *);
00144
00145 uint64_t __leb128_encode(char *, uint64_t, uint64_t);
00146
00147 __unw_error_t unwind_process(__unw_error_t (*)(char *, uint64_t, char *,
00148 uint64_t, void *), void *);
00149
00150 __unw_error_t unwind_dump2ascii(char *, uint64_t,
00151 char *, uint64_t, void *);
00152
00153
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157
00158 #endif