summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commit5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c
parent83e00d4274950d2b531c24692cd123538ffbddb9 (diff)
downloadFreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip
FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Diffstat (limited to 'gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c')
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c b/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c
index 386f522..45beee1 100644
--- a/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c
+++ b/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c
@@ -104,21 +104,21 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
register int addr;
int bad_reg = -1;
int offset;
- struct user *tmp_uaddr;
+ struct pcb *tmp_pcbaddr;
/*
* First get virtual address of user structure. Then calculate offset.
*/
- memcpy(&tmp_uaddr,
- &((struct user *) core_reg_sect)->u_kproc.ki_addr,
- sizeof(tmp_uaddr));
- offset = -reg_addr - (int) tmp_uaddr;
+ memcpy(&tmp_pcbaddr,
+ &((struct user *) core_reg_sect)->u_kproc.ki_pcb,
+ sizeof(tmp_pcbaddr));
+ offset = -reg_addr - (int) tmp_pcbaddr;
for (regno = 0; regno < NUM_REGS; regno++)
{
cregno = tregmap[regno];
if (cregno == tGS)
- addr = offsetof (struct user, u_pcb) + offsetof (struct pcb, pcb_gs);
+ addr = offsetof (struct pcb, pcb_gs);
else
addr = offset + 4 * cregno;
if (addr < 0 || addr >= core_reg_size)
@@ -136,11 +136,7 @@ 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
+ addr = offsetof (struct pcb, pcb_save);
memcpy (&pcb_savefpu, core_reg_sect + addr, sizeof pcb_savefpu);
}
@@ -170,11 +166,6 @@ 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)
@@ -344,15 +335,13 @@ i386_float_info ()
/* fpstate defined in <sys/user.h> */
struct fpstate *fpstatep;
char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
- unsigned int uaddr;
char fpvalid;
unsigned int rounded_addr;
unsigned int rounded_size;
/*extern int corechan;*/
int skip;
extern int inferior_pid;
-
- uaddr = (char *)&U_FPSTATE(u) - (char *)&u;
+
if (inferior_pid != 0 && core_bfd == NULL)
{
int pid = inferior_pid & ((1 << 17) - 1); /* XXX extract pid from tid */
OpenPOWER on IntegriCloud