PERFORCE change 77408 for review
Peter Wemm
peter at FreeBSD.org
Tue May 24 20:57:48 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=77408
Change 77408 by peter at peter_melody on 2005/05/24 20:57:17
Even more evil.
Affected files ...
.. //depot/projects/hammer/sys/kern/sys_process.c#23 edit
.. //depot/projects/hammer/sys/sys/ptrace.h#8 edit
Differences ...
==== //depot/projects/hammer/sys/kern/sys_process.c#23 (text+ko) ====
@@ -32,6 +32,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/kern/sys_process.c,v 1.130 2005/03/18 21:22:28 das Exp $");
+#include "opt_compat.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>
@@ -56,7 +58,9 @@
#include <vm/vm_page.h>
#ifdef COMPAT_IA32
-#include <comapt/ia32/ia32_reg.h>
+#include <sys/procfs.h>
+#include <machine/fpu.h>
+#include <compat/ia32/ia32_reg.h>
extern struct sysentvec ia32_freebsd_sysvec;
#endif
@@ -102,52 +106,28 @@
proc_read_regs(struct thread *td, struct reg *regs)
{
-#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec &&
- curthread->td_proc->p_sysent == &ia32_freebsd_sysvec)
- PROC_ACTION(fill_regs32(td, regs));
- else
-#endif
- PROC_ACTION(fill_regs(td, regs));
+ PROC_ACTION(fill_regs(td, regs));
}
int
proc_write_regs(struct thread *td, struct reg *regs)
{
-#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec &&
- curthread->td_proc->p_sysent == &ia32_freebsd_sysvec)
- PROC_ACTION(set_regs32(td, regs));
- else
-#endif
- PROC_ACTION(set_regs(td, regs));
+ PROC_ACTION(set_regs(td, regs));
}
int
proc_read_dbregs(struct thread *td, struct dbreg *dbregs)
{
-#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec &&
- curthread->td_proc->p_sysent == &ia32_freebsd_sysvec)
- PROC_ACTION(fill_dbregs32(td, dbregs));
- else
-#endif
- PROC_ACTION(fill_dbregs(td, dbregs));
+ PROC_ACTION(fill_dbregs(td, dbregs));
}
int
proc_write_dbregs(struct thread *td, struct dbreg *dbregs)
{
-#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec &&
- curthread->td_proc->p_sysent == &ia32_freebsd_sysvec)
- PROC_ACTION(set_dbregs32(td, dbregs));
- else
-#endif
- PROC_ACTION(set_dbregs(td, dbregs));
+ PROC_ACTION(set_dbregs(td, dbregs));
}
/*
@@ -158,27 +138,59 @@
proc_read_fpregs(struct thread *td, struct fpreg *fpregs)
{
-#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec &&
- curthread->td_proc->p_sysent == &ia32_freebsd_sysvec)
- PROC_ACTION(fill_fpregs32(td, fpregs));
- else
-#endif
- PROC_ACTION(fill_fpregs(td, fpregs));
+ PROC_ACTION(fill_fpregs(td, fpregs));
}
int
proc_write_fpregs(struct thread *td, struct fpreg *fpregs)
{
+ PROC_ACTION(set_fpregs(td, fpregs));
+}
+
#ifdef COMPAT_IA32
- if (td->td_proc->p_sysent == &ia32_freebsd_sysvec &&
- curthread->td_proc->p_sysent == &ia32_freebsd_sysvec)
- PROC_ACTION(set_fpregs32(td, fpregs));
- else
+int
+proc_read_regs32(struct thread *td, struct reg32 *regs32)
+{
+
+ PROC_ACTION(fill_regs32(td, regs32));
+}
+
+int
+proc_write_regs32(struct thread *td, struct reg32 *regs32)
+{
+
+ PROC_ACTION(set_regs32(td, regs32));
+}
+
+int
+proc_read_dbregs32(struct thread *td, struct dbreg32 *dbregs32)
+{
+
+ PROC_ACTION(fill_dbregs32(td, dbregs32));
+}
+
+int
+proc_write_dbregs32(struct thread *td, struct dbreg32 *dbregs32)
+{
+
+ PROC_ACTION(set_dbregs32(td, dbregs32));
+}
+
+int
+proc_read_fpregs32(struct thread *td, struct fpreg32 *fpregs32)
+{
+
+ PROC_ACTION(fill_fpregs32(td, fpregs32));
+}
+
+int
+proc_write_fpregs32(struct thread *td, struct fpreg32 *fpregs32)
+{
+
+ PROC_ACTION(set_fpregs32(td, fpregs32));
+}
#endif
- PROC_ACTION(set_fpregs(td, fpregs));
-}
int
proc_sstep(struct thread *td)
==== //depot/projects/hammer/sys/sys/ptrace.h#8 (text+ko) ====
@@ -135,6 +135,17 @@
int proc_write_dbregs(struct thread *_td, struct dbreg *_dbreg);
int proc_sstep(struct thread *_td);
int proc_rwmem(struct proc *_p, struct uio *_uio);
+#ifdef COMPAT_IA32
+struct reg32;
+struct fpreg32;
+struct dbreg32;
+int proc_read_regs32(struct thread *_td, struct reg32 *_reg32);
+int proc_write_regs32(struct thread *_td, struct reg32 *_reg32);
+int proc_read_fpregs32(struct thread *_td, struct fpreg32 *_fpreg32);
+int proc_write_fpregs32(struct thread *_td, struct fpreg32 *_fpreg32);
+int proc_read_dbregs32(struct thread *_td, struct dbreg32 *_dbreg32);
+int proc_write_dbregs32(struct thread *_td, struct dbreg32 *_dbreg32);
+#endif
#else /* !_KERNEL */
#include <sys/cdefs.h>
More information about the p4-projects
mailing list