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
00047
00048
00049
00050 #ifndef __SYS_IA64_UNWIND_IA64_H
00051 #define __SYS_IA64_UNWIND_IA64_H
00052
00053 #include <inttypes.h>
00054
00055
00056 #define __UNW_VERSION 0x01
00057
00058
00059 #define __UNW_OK 0x00
00060 #define __UNW_INTERNAL_ERROR 0x01
00061 #define __UNW_MALLOC_ERROR 0x02
00062 #define __UNW_REALLOC_ERROR 0x03
00063 #define __UNW_MMAP_ERROR 0x04
00064 #define __UNW_SYSCALL_ERROR 0x05
00065 #define __UNW_NULL_ERROR 0x06
00066 #define __UNW_INV_ARG_ERROR 0x07
00067 #define __UNW_INV_SIZE_ERROR 0x08
00068 #define __UNW_INV_OP_ERROR 0x09
00069 #define __UNW_INV_ALIGNMENT_ERROR 0x0a
00070 #define __UNW_INV_VERSION_ERROR 0x0b
00071 #define __UNW_NOT_FOUND_ERROR 0x0c
00072
00073
00074 #ifdef _ABI32
00075 typedef uint32_t __unw_addr_t;
00076 #else
00077 typedef uint64_t __unw_addr_t;
00078 #endif
00079 typedef uint64_t __unw_dbl_word_t;
00080 typedef uint32_t __unw_word_t;
00081 typedef int32_t __unw_error_t;
00082
00083
00084 typedef struct __unw_table_entry_struct {
00085 __unw_addr_t _start;
00086 __unw_addr_t _end;
00087 __unw_addr_t _info;
00088 } __unw_table_entry_t;
00089
00090
00091 typedef struct __unw_info_struct {
00092 __unw_dbl_word_t _header;
00093 char _body[1];
00094 } __unw_info_t;
00095
00096
00097
00098 #define __UNW_IS_HEADER(x) (!((x) & 0x80))
00099
00100
00101 #define __UNW_IS_PROLOGUE_HEADER(x) ((0x00 == ((x) & 0xe0)) \
00102 || (0x40 == ((x) & 0xf8)) \
00103 || (0x60 == (x)))
00104
00105
00106 #define __UNW_IS_BODY_HEADER(x) ((0x20 == ((x) & 0xe0)) \
00107 || (0x61 == (x)))
00108
00109
00110 #define __UNW_IS_R1(x) (0x00 == ((x) & 0xc0))
00111 #define __UNW_IS_R2(x) (0x40 == ((x) & 0xe0))
00112 #define __UNW_IS_R3(x) (0x60 == ((x) & 0xe0))
00113 #define __UNW_IS_P1(x) (0x80 == ((x) & 0xe0))
00114 #define __UNW_IS_P2(x) (0xa0 == ((x) & 0xf0))
00115 #define __UNW_IS_P3(x) (0xb0 == ((x) & 0xf8))
00116 #define __UNW_IS_P4(x) (0xb8 == ((x) & 0xff))
00117 #define __UNW_IS_P5(x) (0xb9 == ((x) & 0xff))
00118 #define __UNW_IS_P6(x) (0xc0 == ((x) & 0xe0))
00119 #define __UNW_IS_P7(x) (0xe0 == ((x) & 0xf0))
00120 #define __UNW_IS_P8(x) (0xf0 == ((x) & 0xff))
00121 #define __UNW_IS_P9(x) (0xf1 == ((x) & 0xff))
00122 #define __UNW_IS_P10(x) (0xff == ((x) & 0xff))
00123 #define __UNW_IS_B1(x) (0x80 == ((x) & 0xc0))
00124 #define __UNW_IS_B2(x) (0xc0 == ((x) & 0xe0))
00125 #define __UNW_IS_B3(x) (0xe0 == ((x) & 0xff))
00126 #define __UNW_IS_B4(x) (0xf0 == ((x) & 0xf7))
00127 #define __UNW_IS_X1(x) (0xf9 == ((x) & 0xff))
00128 #define __UNW_IS_X2(x) (0xfa == ((x) & 0xff))
00129 #define __UNW_IS_X3(x) (0xfb == ((x) & 0xff))
00130 #define __UNW_IS_X4(x) (0xfc == ((x) & 0xff))
00131
00132
00133 #define __UNW_VER(x) ((x) >> 48)
00134 #define __UNW_FLAG_EHANDLER(x) ((x) & 0x0000000100000000LL)
00135 #define __UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000LL)
00136 #define __UNW_LENGTH(x) ((x) & 0x00000000ffffffffLL)
00137
00138
00139
00140 #ifdef __cplusplus
00141 extern "C" {
00142 #endif
00143
00144
00145
00146
00147 uint64_t __leb128_decode(char *, uint64_t, uint64_t *);
00148
00149 uint64_t __leb128_encode(char *, uint64_t, uint64_t);
00150
00151 __unw_error_t unwind_process(__unw_error_t (*)(char *, uint64_t, char *,
00152 uint64_t, void *), void *);
00153
00154 __unw_error_t unwind_dump2ascii(char *, uint64_t,
00155 char *, uint64_t, void *);
00156
00157
00158 #ifdef __cplusplus
00159 }
00160 #endif
00161
00162 #endif