armsigctx.h 2.3 KB

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