Get rid of struct user/UAREA.
[dragonfly.git] / gnu / usr.bin / gdb / libgdb / patches / i386bsd-nat.c.patch
blob6f6e6e1c2aaa2e2dc2f9cd9d6df5d9fe05c5381b
1 $DragonFly: src/gnu/usr.bin/gdb/libgdb/patches/Attic/i386bsd-nat.c.patch,v 1.2 2007/02/25 23:17:12 corecode Exp $
3 diff --git a/contrib/gdb-6.2.1/gdb/i386bsd-nat.c b/contrib/gdb-6.2.1/gdb/i386bsd-nat.c
4 index 4d663fc..b275aa7 100644
5 --- a/contrib/gdb-6.2.1/gdb/i386bsd-nat.c
6 +++ b/contrib/gdb-6.2.1/gdb/i386bsd-nat.c
7 @@ -313,31 +313,6 @@ i386bsd_dr_get_status (void)
9 #endif /* PT_GETDBREGS */
12 -/* Support for the user struct. */
14 -/* Return the address register REGNUM. BLOCKEND is the value of
15 - u.u_ar0, which should point to the registers. */
17 -CORE_ADDR
18 -register_u_addr (CORE_ADDR blockend, int regnum)
20 - gdb_assert (regnum >= 0 && regnum < ARRAY_SIZE (i386bsd_r_reg_offset));
22 - return blockend + i386bsd_r_reg_offset[regnum];
25 -#include <sys/param.h>
26 -#include <sys/user.h>
28 -/* Return the size of the user struct. */
30 -int
31 -kernel_u_size (void)
33 - return (sizeof (struct user));
35 -\f
36 void
37 _initialize_i386bsd_nat (void)
39 @@ -349,7 +324,7 @@ _initialize_i386bsd_nat (void)
40 system header files and sysctl(3) to get at the relevant
41 information. */
43 -#if defined (__FreeBSD_version) && __FreeBSD_version >= 400011
44 +#if defined(__DragonFly__) || (defined (__FreeBSD_version) && __FreeBSD_version >= 400011)
45 #define SC_REG_OFFSET i386fbsd4_sc_reg_offset
46 #elif defined (__FreeBSD_version) && __FreeBSD_version >= 300005
47 #define SC_REG_OFFSET i386fbsd_sc_reg_offset