From b34d7ff9aad6920acbe4de8ef2c2db0a665cbe34 Mon Sep 17 00:00:00 2001 From: mp Date: Tue, 18 Sep 2001 19:06:11 +0000 Subject: Set debug information on the process being traced, not the current (debugger) process. This should allow gdb to function correctly on post-KSE kernels. --- sys/kern/sys_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/sys_process.c') diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 96b38a0..347eebf 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -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; -- cgit v1.1