1 /* Definition of `struct sigcontext' for Linux/ARM 2 Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. 3 This file is part of the GNU C Library. 4 5 The GNU C Library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 The GNU C Library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with the GNU C Library; if not, see 17 <http://www.gnu.org/licenses/>. */ 18 19 /* The format of struct sigcontext changed between 2.0 and 2.1 kernels. 20 Fortunately 2.0 puts a magic number in the first word and this is not 21 a legal value for `trap_no', so we can tell them apart. */ 22 23 /* Early 2.2 and 2.3 kernels do not have the `fault_address' member in 24 the sigcontext structure. Unfortunately there is no reliable way 25 to test for its presence and this word will contain garbage for too-old 26 kernels. Versions 2.2.14 and 2.3.35 (plus later versions) are known to 27 include this element. */ 28 29 #ifndef __ARMSIGCTX_H 30 #define __ARMSIGCTX_H 1 31 32 #include <asm/ptrace.h> 33 34 union k_sigcontext 35 { 36 struct 37 { 38 unsigned long int trap_no; 39 unsigned long int error_code; 40 unsigned long int oldmask; 41 unsigned long int arm_r0; 42 unsigned long int arm_r1; 43 unsigned long int arm_r2; 44 unsigned long int arm_r3; 45 unsigned long int arm_r4; 46 unsigned long int arm_r5; 47 unsigned long int arm_r6; 48 unsigned long int arm_r7; 49 unsigned long int arm_r8; 50 unsigned long int arm_r9; 51 unsigned long int arm_r10; 52 unsigned long int arm_fp; 53 unsigned long int arm_ip; 54 unsigned long int arm_sp; 55 unsigned long int arm_lr; 56 unsigned long int arm_pc; 57 unsigned long int arm_cpsr; 58 unsigned long fault_address; 59 } v21; 60 struct 61 { 62 unsigned long int magic; 63 struct pt_regs reg; 64 unsigned long int trap_no; 65 unsigned long int error_code; 66 unsigned long int oldmask; 67 } v20; 68 }; 69 70 #define SIGCONTEXT_2_0_MAGIC 0x4B534154 71 72 #endif /* bits/armsigctx.h */ 73