HPCToolkit
specific-ucontext-manip.h
Go to the documentation of this file.
1 #ifndef SPECIFIC_UCONTEXT_MANIP
2 #define SPECIFIC_UCONTEXT_MANIP
3 
4 #ifndef __USE_GNU
5 #define __USE_GNU
6 #endif
7 #include <ucontext.h>
8 
9 #define UC_REGS(uc, reg) (uc).uc_mcontext.gregs[reg]
10 
11 #define UC_REG_IP(uc) UC_REGS(uc, REG_RIP)
12 #define UC_REG_BP(uc) UC_REGS(uc, REG_RBP)
13 #define UC_REG_SP(uc) UC_REGS(uc, REG_RSP)
14 
15 #endif // SPECIFIC_UCONTEXT_MANIP