summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authormp <mp@FreeBSD.org>2001-09-18 19:06:11 +0000
committermp <mp@FreeBSD.org>2001-09-18 19:06:11 +0000
commitb34d7ff9aad6920acbe4de8ef2c2db0a665cbe34 (patch)
tree5f4345c8ac6e27561c000378cd38ea046d57e71b /sys/kern
parentaab4748586f4ef203fde67ca19ed8eb2110a64f2 (diff)
downloadFreeBSD-src-b34d7ff9aad6920acbe4de8ef2c2db0a665cbe34.zip
FreeBSD-src-b34d7ff9aad6920acbe4de8ef2c2db0a665cbe34.tar.gz
Set debug information on the process being traced, not the current (debugger)
process. This should allow gdb to function correctly on post-KSE kernels.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sys_process.c4
1 files changed, 2 insertions, 2 deletions
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;
OpenPOWER on IntegriCloud