diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-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/kvm-fbsd.c')
-rw-r--r-- | gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c index fdfc6a3..8a91d97 100644 --- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c +++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c @@ -201,8 +201,12 @@ static struct proc * curProc () { struct proc *p; - CORE_ADDR addr = pcpu + PCPU_OFFSET (curproc); + struct thread *td; + CORE_ADDR addr = pcpu + PCPU_OFFSET (curthread); + if (kvread (addr, &td)) + error ("cannot read thread pointer at %x\n", addr); + addr = (CORE_ADDR)td->td_proc; if (kvread (addr, &p)) error ("cannot read proc pointer at %x\n", addr); return p; @@ -380,13 +384,13 @@ static void get_kcore_registers (regno) int regno; { - struct user *uaddr; + struct pcb *pcbaddr; /* find the pcb for the current process */ - if (cur_proc == NULL || kvread (&cur_proc->p_addr, &uaddr)) + if (cur_proc == NULL || kvread (&cur_proc->p_thread.td_pcb, &pcbaddr)) /* XXXKSE */ error ("cannot read u area ptr for proc at %#x", cur_proc); - if (read_pcb (core_kd, (CORE_ADDR)&uaddr->u_pcb) < 0) - error ("cannot read pcb at %#x", &uaddr->u_pcb); + if (read_pcb (core_kd, (CORE_ADDR)pcbaddr) < 0) + error ("cannot read pcb at %#x", pcbaddr); } static void |