Set debug information on the process being traced, not the current (debugger)

process. This should allow gdb to function correctly on post-KSE kernels.
This commit is contained in:
Mark Peek 2001-09-18 19:06:11 +00:00
parent 84e4de28cc
commit 796ed2a6d0

View File

@ -357,7 +357,7 @@ ptrace(td, uap)
PHOLD(p);
if (uap->req == PT_STEP) {
if ((error = ptrace_single_step (td))) {
if ((error = ptrace_single_step (&p->p_thread))) {
PRELE(p);
return error;
}
@ -365,7 +365,7 @@ ptrace(td, uap)
if (uap->addr != (caddr_t)1) {
fill_kinfo_proc (p, &p->p_uarea->u_kproc);
if ((error = ptrace_set_pc (td,
if ((error = ptrace_set_pc (&p->p_thread,
(u_long)(uintfptr_t)uap->addr))) {
PRELE(p);
return error;