1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

Make this part compile and try and use the p_threads tailq. It might work

but I am not sure, I haven't been able to compile the rest of gdb yet.
This commit is contained in:
Peter Wemm 2002-02-08 03:19:56 +00:00
parent f9393c5e72
commit 656c73dbdf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90383
2 changed files with 14 additions and 4 deletions

View File

@ -387,10 +387,15 @@ get_kcore_registers (regno)
int regno; int regno;
{ {
struct pcb *pcbaddr; struct pcb *pcbaddr;
struct thread *mainthread;
/* find the pcb for the current process */ /* find the pcb for the current process */
if (cur_proc == NULL || kvread (&cur_proc->p_thread.td_pcb, &pcbaddr)) /* XXXKSE */ if (cur_proc == NULL)
error ("cannot read u area ptr for proc at %#x", cur_proc); error ("get_kcore_registers no proc");
if (kvread (TAILQ_FIRST(&cur_proc->p_threads), &mainthread)) /* XXXKSE */
error ("cannot read main thread for proc at %#x", cur_proc);
if (kvread (&mainthread->td_pcb, &pcbaddr)) /* XXXKSE */
error ("cannot read pcb pointer for proc at %#x", cur_proc);
if (read_pcb (core_kd, (CORE_ADDR)pcbaddr) < 0) if (read_pcb (core_kd, (CORE_ADDR)pcbaddr) < 0)
error ("cannot read pcb at %#x", pcbaddr); error ("cannot read pcb at %#x", pcbaddr);
} }

View File

@ -387,10 +387,15 @@ get_kcore_registers (regno)
int regno; int regno;
{ {
struct pcb *pcbaddr; struct pcb *pcbaddr;
struct thread *mainthread;
/* find the pcb for the current process */ /* find the pcb for the current process */
if (cur_proc == NULL || kvread (&cur_proc->p_thread.td_pcb, &pcbaddr)) /* XXXKSE */ if (cur_proc == NULL)
error ("cannot read u area ptr for proc at %#x", cur_proc); error ("get_kcore_registers no proc");
if (kvread (TAILQ_FIRST(&cur_proc->p_threads), &mainthread)) /* XXXKSE */
error ("cannot read main thread for proc at %#x", cur_proc);
if (kvread (&mainthread->td_pcb, &pcbaddr)) /* XXXKSE */
error ("cannot read pcb pointer for proc at %#x", cur_proc);
if (read_pcb (core_kd, (CORE_ADDR)pcbaddr) < 0) if (read_pcb (core_kd, (CORE_ADDR)pcbaddr) < 0)
error ("cannot read pcb at %#x", pcbaddr); error ("cannot read pcb at %#x", pcbaddr);
} }