summaryrefslogtreecommitdiffstats
path: root/sys/arch/powerpc/include/reg.h
diff options
context:
space:
mode:
authorrahnds <rahnds@openbsd.org>1998-08-07 02:22:03 +0000
committerrahnds <rahnds@openbsd.org>1998-08-07 02:22:03 +0000
commitb43c05a1f0746689ffcc1dbcaa8540e09a0ff8bf (patch)
tree31ef90e37e88f2b32923a1dbbe41323444682258 /sys/arch/powerpc/include/reg.h
parentRemove floppy checks from ofwboot. Ramdisk is kernel, not loadef from floppy. (diff)
downloadwireguard-openbsd-b43c05a1f0746689ffcc1dbcaa8540e09a0ff8bf.tar.xz
wireguard-openbsd-b43c05a1f0746689ffcc1dbcaa8540e09a0ff8bf.zip
Add kernel support for debugging with gdb. This also make /proc allow
access to the registers. The format of the registers returned in ptrace, /proc and in the coredump header match what gdb was expecting. Floating point registers are not yet copied into the structure. The location of the fpr needs to be found and copied. <- TODO Changes to trap.c was to add some interm debugging. code is commented out. powerpc does not currently have a MID_* type, since it uses ELF instead of a.out, one was never added. Currently the coredump is done in form of MID_NONE. What is the correct approach for this?? Elf format coredumps... maybe?
Diffstat (limited to 'sys/arch/powerpc/include/reg.h')
-rw-r--r--sys/arch/powerpc/include/reg.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/sys/arch/powerpc/include/reg.h b/sys/arch/powerpc/include/reg.h
index b0c31944803..ba2ab6413a9 100644
--- a/sys/arch/powerpc/include/reg.h
+++ b/sys/arch/powerpc/include/reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: reg.h,v 1.1 1997/01/02 02:55:47 rahnds Exp $ */
+/* $OpenBSD: reg.h,v 1.2 1998/08/07 02:22:06 rahnds Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -41,5 +41,22 @@
#ifndef _POWERPC_REG_H_
#define _POWERPC_REG_H_
-/* not supported yet */
+/*
+ * Struct reg, used for procfs and in signal contexts
+ * Note that in signal contexts, it's represented as an array.
+ * That array has to look exactly like 'struct reg' though.
+ */
+
+/* this table is set up to match what gdb expects */
+struct reg {
+ u_int32_t gpr[32];
+ u_int64_t fpr[32];
+ u_int32_t pc;
+ u_int32_t ps;
+ u_int32_t cnd;
+ u_int32_t lr;
+ u_int32_t cnt;
+ u_int32_t xer;
+ u_int32_t mq;
+};
#endif /* !_POWERPC_REG_H_ */