summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/sparc/process_machdep.c47
1 files changed, 21 insertions, 26 deletions
diff --git a/sys/arch/sparc/sparc/process_machdep.c b/sys/arch/sparc/sparc/process_machdep.c
index f5354856add..9fde6799301 100644
--- a/sys/arch/sparc/sparc/process_machdep.c
+++ b/sys/arch/sparc/sparc/process_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: process_machdep.c,v 1.4 2002/02/20 22:28:23 deraadt Exp $ */
+/* $OpenBSD: process_machdep.c,v 1.5 2002/03/14 00:42:24 miod Exp $ */
/* $NetBSD: process_machdep.c,v 1.6 1996/03/14 21:09:26 christos Exp $ */
/*
@@ -74,8 +74,6 @@
#include <machine/frame.h>
#include <sys/ptrace.h>
-u_int32_t process_get_wcookie(struct proc *p);
-
int
process_read_regs(p, regs)
struct proc *p;
@@ -87,6 +85,23 @@ process_read_regs(p, regs)
}
int
+process_read_fpregs(p, regs)
+ struct proc *p;
+ struct fpreg *regs;
+{
+ extern struct fpstate initfpstate;
+ struct fpstate *statep = &initfpstate;
+
+ /* NOTE: struct fpreg == struct fpstate */
+ if (p->p_md.md_fpstate)
+ statep = p->p_md.md_fpstate;
+ bcopy(statep, regs, sizeof(struct fpreg));
+ return 0;
+}
+
+#ifdef PTRACE
+
+int
process_write_regs(p, regs)
struct proc *p;
struct reg *regs;
@@ -118,24 +133,9 @@ process_set_pc(p, addr)
}
int
-process_read_fpregs(p, regs)
-struct proc *p;
-struct fpreg *regs;
-{
- extern struct fpstate initfpstate;
- struct fpstate *statep = &initfpstate;
-
- /* NOTE: struct fpreg == struct fpstate */
- if (p->p_md.md_fpstate)
- statep = p->p_md.md_fpstate;
- bcopy(statep, regs, sizeof(struct fpreg));
- return 0;
-}
-
-int
process_write_fpregs(p, regs)
-struct proc *p;
-struct fpreg *regs;
+ struct proc *p;
+ struct fpreg *regs;
{
if (p->p_md.md_fpstate == NULL)
return EINVAL;
@@ -144,9 +144,4 @@ struct fpreg *regs;
return 0;
}
-u_int32_t
-process_get_wcookie(p)
- struct proc *p;
-{
- return p->p_addr->u_pcb.pcb_wcookie;
-}
+#endif /* PTRACE */