diff options
author | peter <peter@FreeBSD.org> | 2001-07-12 13:01:17 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-07-12 13:01:17 +0000 |
commit | ad25811e3e4772f1b4641d9954f2a48b9eea50ea (patch) | |
tree | 3756b0624baaf194918256797ac3195dbeb8d9d8 /gnu | |
parent | 194b77852c0212c75c9599fc6dea1c80cf1758d8 (diff) | |
download | FreeBSD-src-ad25811e3e4772f1b4641d9954f2a48b9eea50ea.zip FreeBSD-src-ad25811e3e4772f1b4641d9954f2a48b9eea50ea.tar.gz |
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...
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) |