| 1 |
#pragma once |
| 2 |
|
| 3 |
#define _XOPEN_SOURCE 700 |
| 4 |
|
| 5 |
#include <stddef.h> |
| 6 |
#include <stdint.h> |
| 7 |
#include <ucontext.h> |
| 8 |
|
| 9 |
|
| 10 |
#ifdef X86_32 |
| 11 |
#define UNW_REG_IP 8 |
| 12 |
typedef uint32_t unw_word_t; |
| 13 |
typedef int32_t unw_sword_t; |
| 14 |
#elif defined(X86_64) |
| 15 |
#define UNW_REG_IP 16 |
| 16 |
typedef uint64_t unw_word_t; |
| 17 |
typedef int64_t unw_sword_t; |
| 18 |
#elif defined (__powerpc64__) |
| 19 |
#define UNW_REG_IP 32 |
| 20 |
typedef uint64_t unw_word_t; |
| 21 |
typedef int64_t unw_sword_t; |
| 22 |
#else |
| 23 |
|
| 24 |
#endif |
| 25 |
|
| 26 |
|
| 27 |
#define UNW_TDEP_CURSOR_LEN 127 |
| 28 |
|
| 29 |
#ifdef VMP_SUPPORTS_NATIVE_PROFILING |
| 30 |
typedef struct unw_cursor |
| 31 |
{ |
| 32 |
unw_word_t opaque[UNW_TDEP_CURSOR_LEN]; |
| 33 |
} |
| 34 |
unw_cursor_t; |
| 35 |
|
| 36 |
typedef struct unw_proc_info |
| 37 |
{ |
| 38 |
unw_word_t start_ip; |
| 39 |
unw_word_t end_ip; |
| 40 |
unw_word_t lsda; |
| 41 |
unw_word_t handler; |
| 42 |
unw_word_t gp; |
| 43 |
unw_word_t flags; |
| 44 |
|
| 45 |
int format; |
| 46 |
int unwind_info_size; |
| 47 |
void *unwind_info; |
| 48 |
} unw_proc_info_t; |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
#endif |