File: signal_netbsd_amd64.h

package info (click to toggle)
golang 2%3A1.4.3-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 51,384 kB
  • ctags: 101,656
  • sloc: ansic: 152,451; asm: 23,333; yacc: 4,975; python: 2,876; sh: 2,713; perl: 1,103; xml: 623; makefile: 167; awk: 120; cpp: 22
file content (31 lines) | stat: -rw-r--r-- 1,630 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2013 The Go Authors.  All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

#define SIG_REGS(ctxt) (((UcontextT*)(ctxt))->uc_mcontext)

#define SIG_RAX(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RAX])
#define SIG_RBX(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RBX])
#define SIG_RCX(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RCX])
#define SIG_RDX(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RDX])
#define SIG_RDI(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RDI])
#define SIG_RSI(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RSI])
#define SIG_RBP(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RBP])
#define SIG_RSP(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RSP])
#define SIG_R8(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R8])
#define SIG_R9(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R9])
#define SIG_R10(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R10])
#define SIG_R11(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R11])
#define SIG_R12(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R12])
#define SIG_R13(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R13])
#define SIG_R14(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R14])
#define SIG_R15(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R15])
#define SIG_RIP(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RIP])
#define SIG_RFLAGS(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_RFLAGS])

#define SIG_CS(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_CS])
#define SIG_FS(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_FS])
#define SIG_GS(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_GS])

#define SIG_CODE0(info, ctxt) ((info)->_code)
#define SIG_CODE1(info, ctxt) (*(uintptr*)&(info)->_reason[0])