cris.patch 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. diff -Nur uClibc-0.9.32-rc1.orig/libc/sysdeps/linux/cris/sys/user.h uClibc-0.9.32-rc1/libc/sysdeps/linux/cris/sys/user.h
  2. --- uClibc-0.9.32-rc1.orig/libc/sysdeps/linux/cris/sys/user.h 1970-01-01 01:00:00.000000000 +0100
  3. +++ uClibc-0.9.32-rc1/libc/sysdeps/linux/cris/sys/user.h 2010-12-28 16:41:14.000000000 +0100
  4. @@ -0,0 +1,81 @@
  5. +#ifndef __ASM_CRIS_USER_H
  6. +#define __ASM_CRIS_USER_H
  7. +
  8. +/* User-mode register used for core dumps. */
  9. +
  10. +struct user_fpregs {
  11. +};
  12. +
  13. +struct user_regs_struct {
  14. + unsigned long r0; /* General registers. */
  15. + unsigned long r1;
  16. + unsigned long r2;
  17. + unsigned long r3;
  18. + unsigned long r4;
  19. + unsigned long r5;
  20. + unsigned long r6;
  21. + unsigned long r7;
  22. + unsigned long r8;
  23. + unsigned long r9;
  24. + unsigned long r10;
  25. + unsigned long r11;
  26. + unsigned long r12;
  27. + unsigned long r13;
  28. + unsigned long sp; /* R14, Stack pointer. */
  29. + unsigned long acr; /* R15, Address calculation register. */
  30. + unsigned long bz; /* P0, Constant zero (8-bits). */
  31. + unsigned long vr; /* P1, Version register (8-bits). */
  32. + unsigned long pid; /* P2, Process ID (8-bits). */
  33. + unsigned long srs; /* P3, Support register select (8-bits). */
  34. + unsigned long wz; /* P4, Constant zero (16-bits). */
  35. + unsigned long exs; /* P5, Exception status. */
  36. + unsigned long eda; /* P6, Exception data address. */
  37. + unsigned long mof; /* P7, Multiply overflow regiter. */
  38. + unsigned long dz; /* P8, Constant zero (32-bits). */
  39. + unsigned long ebp; /* P9, Exception base pointer. */
  40. + unsigned long erp; /* P10, Exception return pointer. */
  41. + unsigned long srp; /* P11, Subroutine return pointer. */
  42. + unsigned long nrp; /* P12, NMI return pointer. */
  43. + unsigned long ccs; /* P13, Condition code stack. */
  44. + unsigned long usp; /* P14, User mode stack pointer. */
  45. + unsigned long spc; /* P15, Single step PC. */
  46. +};
  47. +
  48. +/*
  49. + * Core file format: The core file is written in such a way that gdb
  50. + * can understand it and provide useful information to the user (under
  51. + * linux we use the `trad-core' bfd). The file contents are as follows:
  52. + *
  53. + * upage: 1 page consisting of a user struct that tells gdb
  54. + * what is present in the file. Directly after this is a
  55. + * copy of the task_struct, which is currently not used by gdb,
  56. + * but it may come in handy at some point. All of the registers
  57. + * are stored as part of the upage. The upage should always be
  58. + * only one page long.
  59. + * data: The data segment follows next. We use current->end_text to
  60. + * current->brk to pick up all of the user variables, plus any memory
  61. + * that may have been sbrk'ed. No attempt is made to determine if a
  62. + * page is demand-zero or if a page is totally unused, we just cover
  63. + * the entire range. All of the addresses are rounded in such a way
  64. + * that an integral number of pages is written.
  65. + * stack: We need the stack information in order to get a meaningful
  66. + * backtrace. We need to write the data from usp to
  67. + * current->start_stack, so we round each of these in order to be able
  68. + * to write an integer number of pages.
  69. + */
  70. +
  71. +struct user {
  72. + struct user_regs_struct regs; /* entire machine state */
  73. + size_t u_tsize; /* text size (pages) */
  74. + size_t u_dsize; /* data size (pages) */
  75. + size_t u_ssize; /* stack size (pages) */
  76. + unsigned long start_code; /* text starting address */
  77. + unsigned long start_data; /* data starting address */
  78. + unsigned long start_stack; /* stack starting address */
  79. + long int signal; /* signal causing core dump */
  80. + unsigned long u_ar0; /* help gdb find registers */
  81. + unsigned long magic; /* identifies a core file */
  82. + char u_comm[32]; /* user command name */
  83. +};
  84. +
  85. +#endif /* __ASM_CRIS_USER_H */
  86. diff -Nur uClibc-0.9.32-rc1.orig/libc/sysdeps/linux/cris/sysdep.h uClibc-0.9.32-rc1/libc/sysdeps/linux/cris/sysdep.h
  87. --- uClibc-0.9.32-rc1.orig/libc/sysdeps/linux/cris/sysdep.h 2010-12-17 20:05:17.000000000 +0100
  88. +++ uClibc-0.9.32-rc1/libc/sysdeps/linux/cris/sysdep.h 2010-12-28 16:41:08.000000000 +0100
  89. @@ -20,6 +20,8 @@
  90. #ifndef _SYSDEP_H_
  91. #define _SYSDEP_H_
  92. +#include <sys/syscall.h>
  93. +
  94. #ifndef C_LABEL
  95. /* Define a macro we can use to construct the asm name for a C symbol. */