1
// Copyright 2013 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
5
#define SIG_REGS(ctxt) (((UcontextT*)(ctxt))->uc_mcontext)
7
#define SIG_EAX(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_EAX])
8
#define SIG_EBX(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_EBX])
9
#define SIG_ECX(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_ECX])
10
#define SIG_EDX(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_EDX])
11
#define SIG_EDI(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_EDI])
12
#define SIG_ESI(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_ESI])
13
#define SIG_EBP(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_EBP])
14
#define SIG_ESP(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_UESP])
15
#define SIG_EIP(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_EIP])
16
#define SIG_EFLAGS(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_EFL])
18
#define SIG_CS(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_CS])
19
#define SIG_FS(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_FS])
20
#define SIG_GS(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_GS])
22
#define SIG_CODE0(info, ctxt) ((info)->_code)
23
#define SIG_CODE1(info, ctxt) (*(uintptr*)&(info)->_reason[0])