aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/include/reg.h
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1997-06-07 00:49:45 +0000
committerBruce Evans <bde@FreeBSD.org>1997-06-07 00:49:45 +0000
commitf0a2dcf23d2e84529056a9bf6525eb3a6d5a46ca (patch)
treebc27fee5e0053336792b6656ede3f077f02a7428 /sys/i386/include/reg.h
parentea1376dfbb31f4df4d967cc1b7b86d2f5c3bd402 (diff)
Notes
Diffstat (limited to 'sys/i386/include/reg.h')
-rw-r--r--sys/i386/include/reg.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/i386/include/reg.h b/sys/i386/include/reg.h
index 93cc4b563eec..c896fe5128e5 100644
--- a/sys/i386/include/reg.h
+++ b/sys/i386/include/reg.h
@@ -34,21 +34,23 @@
* SUCH DAMAGE.
*
* from: @(#)reg.h 5.5 (Berkeley) 1/18/91
- * $Id$
+ * $Id: reg.h,v 1.13 1997/02/22 09:35:07 peter Exp $
*/
#ifndef _MACHINE_REG_H_
#define _MACHINE_REG_H_
/*
- * Location of the users' stored
- * registers within appropriate frame of 'trap' and 'syscall', relative to
- * base of stack frame.
- * Normal usage is u.u_ar0[XX] in kernel.
+ * Indices for registers in `struct trapframe' and `struct regs'.
+ *
+ * This interface is deprecated. In the kernel, it is only used in FPU
+ * emulators to convert from register numbers encoded in instructions to
+ * register values. Everything else just accesses the relevant struct
+ * members. In userland, debuggers tend to abuse this interface since
+ * they don't understand that `struct regs' is a struct. I hope they have
+ * stopped accessing the registers in the trap frame via PT_{READ,WRITE}_U
+ * and we can stop supporting the user area soon.
*/
-
-/* When referenced during a trap/exception, registers are at these offsets */
-
#define tES (0)
#define tDS (1)
#define tEDI (2)
@@ -59,9 +61,7 @@
#define tEDX (7)
#define tECX (8)
#define tEAX (9)
-
#define tERR (11)
-
#define tEIP (12)
#define tCS (13)
#define tEFLAGS (14)
@@ -69,10 +69,7 @@
#define tSS (16)
/*
- * Registers accessible to ptrace(2) syscall for debugger
- * The machine-dependent code for PT_{SET,GET}REGS needs to
- * use whichever order, defined above, is correct, so that it
- * is all invisible to the user.
+ * Register set accessible via /proc/$pid/regs and PT_{SET,GET}REGS.
*/
struct reg {
unsigned int r_es;
@@ -95,7 +92,7 @@ struct reg {
};
/*
- * Register set accessible via /proc/$pid/fpreg
+ * Register set accessible via /proc/$pid/fpregs.
*/
struct fpreg {
/*
@@ -110,6 +107,9 @@ struct fpreg {
};
#ifdef KERNEL
+/*
+ * XXX these interfaces are MI, so they should be declared in a MI place.
+ */
int set_regs __P((struct proc *p, struct reg *regs));
void setregs __P((struct proc *, u_long, u_long));
#endif