~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/runtime/signal_linux_amd64.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 14:06:23 UTC
  • mfrom: (14.1.23 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130820140623-b414jfxi3m0qkmrq
Tags: 2:1.1.2-2ubuntu1
* Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - d/control,control.cross: Update Breaks/Replaces for Ubuntu
    versions to ensure smooth upgrades, regenerate control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
4
 
 
5
#define SIG_REGS(ctxt) (*((Sigcontext*)&((Ucontext*)(ctxt))->uc_mcontext))
 
6
 
 
7
#define SIG_RAX(info, ctxt) (SIG_REGS(ctxt).rax)
 
8
#define SIG_RBX(info, ctxt) (SIG_REGS(ctxt).rbx)
 
9
#define SIG_RCX(info, ctxt) (SIG_REGS(ctxt).rcx)
 
10
#define SIG_RDX(info, ctxt) (SIG_REGS(ctxt).rdx)
 
11
#define SIG_RDI(info, ctxt) (SIG_REGS(ctxt).rdi)
 
12
#define SIG_RSI(info, ctxt) (SIG_REGS(ctxt).rsi)
 
13
#define SIG_RBP(info, ctxt) (SIG_REGS(ctxt).rbp)
 
14
#define SIG_RSP(info, ctxt) (SIG_REGS(ctxt).rsp)
 
15
#define SIG_R8(info, ctxt) (SIG_REGS(ctxt).r8)
 
16
#define SIG_R9(info, ctxt) (SIG_REGS(ctxt).r9)
 
17
#define SIG_R10(info, ctxt) (SIG_REGS(ctxt).r10)
 
18
#define SIG_R11(info, ctxt) (SIG_REGS(ctxt).r11)
 
19
#define SIG_R12(info, ctxt) (SIG_REGS(ctxt).r12)
 
20
#define SIG_R13(info, ctxt) (SIG_REGS(ctxt).r13)
 
21
#define SIG_R14(info, ctxt) (SIG_REGS(ctxt).r14)
 
22
#define SIG_R15(info, ctxt) (SIG_REGS(ctxt).r15)
 
23
#define SIG_RIP(info, ctxt) (SIG_REGS(ctxt).rip)
 
24
#define SIG_RFLAGS(info, ctxt) ((uint64)SIG_REGS(ctxt).eflags)
 
25
 
 
26
#define SIG_CS(info, ctxt) ((uint64)SIG_REGS(ctxt).cs)
 
27
#define SIG_FS(info, ctxt) ((uint64)SIG_REGS(ctxt).fs)
 
28
#define SIG_GS(info, ctxt) ((uint64)SIG_REGS(ctxt).gs)
 
29
 
 
30
#define SIG_CODE0(info, ctxt) ((info)->si_code)
 
31
#define SIG_CODE1(info, ctxt) (((uintptr*)(info))[2])
 
32