# define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.eip)
# define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_mcontext.esp)
# define VG_UCONTEXT_FRAME_PTR(uc) ((uc)->uc_mcontext.ebp)
-# define VG_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.eax)
# define VG_UCONTEXT_SYSCALL_SYSRES(uc) \
/* Convert the value in uc_mcontext.eax into a SysRes. */ \
VG_(mk_SysRes_x86_linux)( (uc)->uc_mcontext.eax )
# define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.rip)
# define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_mcontext.rsp)
# define VG_UCONTEXT_FRAME_PTR(uc) ((uc)->uc_mcontext.rbp)
-# define VG_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.rax)
# define VG_UCONTEXT_SYSCALL_SYSRES(uc) \
/* Convert the value in uc_mcontext.rax into a SysRes. */ \
VG_(mk_SysRes_amd64_linux)( (uc)->uc_mcontext.rax )
# define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_regs->mc_gregs[VKI_PT_NIP])
# define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_regs->mc_gregs[VKI_PT_R1])
# define VG_UCONTEXT_FRAME_PTR(uc) ((uc)->uc_regs->mc_gregs[VKI_PT_R1])
-# define VG_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_regs->mc_gregs[VKI_PT_R0])
# define VG_UCONTEXT_SYSCALL_SYSRES(uc) \
/* Convert the values in uc_mcontext r3,cr into a SysRes. */ \
VG_(mk_SysRes_ppc32_linux)( \
# define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_NIP])
# define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_R1])
# define VG_UCONTEXT_FRAME_PTR(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_R1])
-# define VG_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_R0])
/* Dubious hack: if there is an error, only consider the lowest 8
bits of r3. memcheck/tests/post-syscall shows a case where an
interrupted syscall should have produced a ucontext with 0x4
struct mstsave* jc = &mc->jmp_context;
return jc->gpr[1];
}
- static inline Addr VG_UCONTEXT_SYSCALL_NUM( void* ucV ) {
- ucontext_t* uc = (ucontext_t*)ucV;
- struct __jmpbuf* mc = &(uc->uc_mcontext);
- struct mstsave* jc = &mc->jmp_context;
- return jc->gpr[2];
- }
static inline SysRes VG_UCONTEXT_SYSCALL_SYSRES( void* ucV ) {
ucontext_t* uc = (ucontext_t*)ucV;
struct __jmpbuf* mc = &(uc->uc_mcontext);
struct __context64* jc = &mc->jmp_context;
return jc->gpr[1];
}
- static inline Addr VG_UCONTEXT_SYSCALL_NUM( void* ucV ) {
- ucontext_t* uc = (ucontext_t*)ucV;
- struct __jmpbuf* mc = &(uc->uc_mcontext);
- struct __context64* jc = &mc->jmp_context;
- return jc->gpr[2];
- }
static inline SysRes VG_UCONTEXT_SYSCALL_SYSRES( void* ucV ) {
ucontext_t* uc = (ucontext_t*)ucV;
struct __jmpbuf* mc = &(uc->uc_mcontext);