summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-04-01 20:56:44 +0000
committerjhb <jhb@FreeBSD.org>2004-04-01 20:56:44 +0000
commit03d6afada4e764f62ff64f1f4e6de3c40714c0ca (patch)
treea37bfbbfd3209e1e1bcad96a11c4c66fac859dbc /sys/alpha
parent30a416556d36238142f1fb64b45f0d388e898178 (diff)
downloadFreeBSD-src-03d6afada4e764f62ff64f1f4e6de3c40714c0ca.zip
FreeBSD-src-03d6afada4e764f62ff64f1f4e6de3c40714c0ca.tar.gz
Finish fixing up Alpha to work with an MP safe ptrace():
- ptrace_single_step() is no longer called with the proc lock held, so don't try to unlock it and then relock it. - Push Giant down into proc_rwmem() instead of forcing all the consumers (including Alpha breakpoint support) to explicitly wrap calls to proc_rwmem() with Giant. Tested by: kensmith
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/machdep.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c
index cff99c3..b374cbf 100644
--- a/sys/alpha/alpha/machdep.c
+++ b/sys/alpha/alpha/machdep.c
@@ -1914,10 +1914,9 @@ ptrace_single_step(struct thread *td)
if (td->td_md.md_flags & (MDTD_STEP1|MDTD_STEP2))
panic("ptrace_single_step: step breakpoints not removed");
- PROC_UNLOCK(td->td_proc);
error = ptrace_read_int(td, pc, &ins.bits);
if (error)
- goto err;
+ return (error);
switch (ins.branch_format.opcode) {
@@ -1957,20 +1956,18 @@ ptrace_single_step(struct thread *td)
td->td_md.md_sstep[0].addr = addr[0];
error = ptrace_set_bpt(td, &td->td_md.md_sstep[0]);
if (error)
- goto err;
+ return (error);
if (count == 2) {
td->td_md.md_sstep[1].addr = addr[1];
error = ptrace_set_bpt(td, &td->td_md.md_sstep[1]);
if (error) {
ptrace_clear_bpt(td, &td->td_md.md_sstep[0]);
- goto err;
+ return (error);
}
td->td_md.md_flags |= MDTD_STEP2;
} else
td->td_md.md_flags |= MDTD_STEP1;
-err:
- PROC_LOCK(td->td_proc);
return (error);
}
OpenPOWER on IntegriCloud