From ad25811e3e4772f1b4641d9954f2a48b9eea50ea Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 12 Jul 2001 13:01:17 +0000 Subject: Use the real structure names explicitly. Note that this is mostly for reading old a.out core files, which are totally 100% non-understandable to the gdb floating-point reader if you have SSE turned on. This should be the last of the world build breakers... --- gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnu') diff --git a/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c b/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c index 78c8f96..386f522 100644 --- a/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c +++ b/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c @@ -136,7 +136,11 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr) error ("Register %s not found in core file.", gdb_register_names[bad_reg]); } +#if __FreeBSD_version >= 500022 + addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_save); +#else addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_savefpu); +#endif memcpy (&pcb_savefpu, core_reg_sect + addr, sizeof pcb_savefpu); } @@ -166,7 +170,11 @@ extern void print_387_control_word (); /* i387-tdep.h */ extern void print_387_status_word (); #define fpstate save87 +#if __FreeBSD_version >= 500022 +#define U_FPSTATE(u) u.u_pcb.pcb_save.sv_87 +#else #define U_FPSTATE(u) u.u_pcb.pcb_savefpu +#endif static void i387_to_double (from, to) -- cgit v1.1