summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-05-18 16:44:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-05-18 16:44:42 +0000
commit26e09a24a7175a28ba4d0995a6a28ab09bce9e53 (patch)
tree7736c530a3a91aefd36f539e97ec75461cbdcb5d /sys/arch/m88k/include
parentb7fb17d11aa21124768cb709cc4f0936c84a2ca6 (diff)
Rework the single step implementation; mostly delaying breakpoint
removal so that single stepping delay slots work. Also added the ability to single step through system calls (which cause an implicit branch if successfull). works for me, "looks ok" kettenis@
Diffstat (limited to 'sys/arch/m88k/include')
-rw-r--r--sys/arch/m88k/include/proc.h26
-rw-r--r--sys/arch/m88k/include/ptrace.h6
2 files changed, 17 insertions, 15 deletions
diff --git a/sys/arch/m88k/include/proc.h b/sys/arch/m88k/include/proc.h
index 1db1c6a3c00..c658452b17a 100644
--- a/sys/arch/m88k/include/proc.h
+++ b/sys/arch/m88k/include/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */
+/* $OpenBSD: proc.h,v 1.2 2005/05/18 16:44:37 miod Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -44,21 +44,27 @@
#ifndef __MACHINE_PROC_H__
#define __MACHINE_PROC_H__
-#include <machine/pcb.h>
+struct trapframe;
/*
* Machine-dependent part of the proc structure for mvme88k.
*/
struct mdproc {
- struct trapframe *md_tf; /* trap/syscall registers */
- struct fpstate *md_fpstate; /* fpu state, if any; always resident */
- int md_upte[UPAGES]; /* ptes for mapping u page */
+ struct trapframe *md_tf; /* trap/syscall registers */
+ int md_upte[UPAGES]; /* ptes for mapping u page */
- unsigned md_ss_addr; /* single step address for ptrace */
- unsigned md_ss_instr; /* single step instruction for ptrace */
- unsigned md_ss_taken_addr; /* single step address for ptrace */
- unsigned md_ss_taken_instr; /* single step instruction for ptrace */
+ /*
+ * Single stepping is done by moving two breakpoints in the
+ * process' code:
+ * - one breakpoint for regular flow (i.e. the immediately following
+ * instruction)
+ * - one breakpoint for potential branches.
+ * Using two breakpoints allows us to not worry about the delay slots.
+ */
+ vaddr_t md_bp0va;
+ u_int md_bp0save;
+ vaddr_t md_bp1va;
+ u_int md_bp1save;
};
#endif /* __MACHINE_PROC_H__ */
-
diff --git a/sys/arch/m88k/include/ptrace.h b/sys/arch/m88k/include/ptrace.h
index d6fa059eeda..f258f2fff90 100644
--- a/sys/arch/m88k/include/ptrace.h
+++ b/sys/arch/m88k/include/ptrace.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ptrace.h,v 1.2 2005/05/16 11:47:14 miod Exp $ */
+/* $OpenBSD: ptrace.h,v 1.3 2005/05/18 16:44:37 miod Exp $ */
/*
* Copyright (c) 1999, Steve Murphree, Jr.
* Copyright (c) 1992, 1993
@@ -53,8 +53,4 @@
#define PT_GETREGS (PT_FIRSTMACH + 1)
#define PT_SETREGS (PT_FIRSTMACH + 2)
-#ifdef _KERNEL
-int cpu_singlestep(struct proc *);
-#endif
-
#endif /* __MACHINE_PTRACE_H__ */