1.1 --- a/patches/glibc/2_9/510-sh-no-asm-user-header.patch Sat Apr 11 19:03:02 2009 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,70 +0,0 @@
1.4 -2007-03-13 Mike Frysinger <vapier@gentoo.org>
1.5 -
1.6 - * sysdeps/unix/sysv/linux/sh/sys/user.h: Copy Linux's asm-sh/user.h.
1.7 -
1.8 ---- glibc-2_9/sysdeps/unix/sysv/linux/sh/sys/user.h
1.9 -+++ glibc-2_9/sysdeps/unix/sysv/linux/sh/sys/user.h
1.10 -@@ -19,10 +19,60 @@
1.11 - #ifndef _SYS_USER_H
1.12 - #define _SYS_USER_H 1
1.13 -
1.14 --#include <features.h>
1.15 -+#include <unistd.h>
1.16 -+#include <asm/ptrace.h>
1.17 -
1.18 --#include <asm/user.h>
1.19 -+/*
1.20 -+ * Core file format: The core file is written in such a way that gdb
1.21 -+ * can understand it and provide useful information to the user (under
1.22 -+ * linux we use the `trad-core' bfd). The file contents are as follows:
1.23 -+ *
1.24 -+ * upage: 1 page consisting of a user struct that tells gdb
1.25 -+ * what is present in the file. Directly after this is a
1.26 -+ * copy of the task_struct, which is currently not used by gdb,
1.27 -+ * but it may come in handy at some point. All of the registers
1.28 -+ * are stored as part of the upage. The upage should always be
1.29 -+ * only one page long.
1.30 -+ * data: The data segment follows next. We use current->end_text to
1.31 -+ * current->brk to pick up all of the user variables, plus any memory
1.32 -+ * that may have been sbrk'ed. No attempt is made to determine if a
1.33 -+ * page is demand-zero or if a page is totally unused, we just cover
1.34 -+ * the entire range. All of the addresses are rounded in such a way
1.35 -+ * that an integral number of pages is written.
1.36 -+ * stack: We need the stack information in order to get a meaningful
1.37 -+ * backtrace. We need to write the data from usp to
1.38 -+ * current->start_stack, so we round each of these in order to be able
1.39 -+ * to write an integer number of pages.
1.40 -+ */
1.41 -
1.42 --#undef start_thread
1.43 -+struct user_fpu_struct {
1.44 -+ unsigned long fp_regs[16];
1.45 -+ unsigned long xfp_regs[16];
1.46 -+ unsigned long fpscr;
1.47 -+ unsigned long fpul;
1.48 -+};
1.49 -+
1.50 -+struct user {
1.51 -+ struct pt_regs regs; /* entire machine state */
1.52 -+ struct user_fpu_struct fpu; /* Math Co-processor registers */
1.53 -+ int u_fpvalid; /* True if math co-processor being used */
1.54 -+ size_t u_tsize; /* text size (pages) */
1.55 -+ size_t u_dsize; /* data size (pages) */
1.56 -+ size_t u_ssize; /* stack size (pages) */
1.57 -+ unsigned long start_code; /* text starting address */
1.58 -+ unsigned long start_data; /* data starting address */
1.59 -+ unsigned long start_stack; /* stack starting address */
1.60 -+ long int signal; /* signal causing core dump */
1.61 -+ struct regs * u_ar0; /* help gdb find registers */
1.62 -+ struct user_fpu_struct* u_fpstate; /* Math Co-processor pointer */
1.63 -+ unsigned long magic; /* identifies a core file */
1.64 -+ char u_comm[32]; /* user command name */
1.65 -+};
1.66 -+
1.67 -+#define NBPG getpagesize()
1.68 -+#define UPAGES 1
1.69 -+#define HOST_TEXT_START_ADDR (u.start_code)
1.70 -+#define HOST_DATA_START_ADDR (u.start_data)
1.71 -+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
1.72 -
1.73 - #endif /* sys/user.h */