Module Name:    src
Committed By:   rin
Date:           Mon Dec 14 01:58:48 UTC 2020

Modified Files:
        src/sys/arch/arm/include: ptrace.h

Log Message:
Obsolete PT_STEP and friends, that have never been implemented.

PT_STEP was exposed to userland for NetBSD 1.6 to 9, and
PT_SETSTEP and PT_CLEARSTEP was for 8 to 9. Therefore, they cannot be
reused for other purposes.

PT_STEP was introduced to arm/ptrace.h rev 1.2:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/include/ptrace.h#rev1.2

This was for workaround against GDB, which assumes PT_STEP is 9 (even
today!!), if it is undefined. But, this should have been dealt with
differently...


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/include/ptrace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/include/ptrace.h
diff -u src/sys/arch/arm/include/ptrace.h:1.16 src/sys/arch/arm/include/ptrace.h:1.17
--- src/sys/arch/arm/include/ptrace.h:1.16	Tue Dec  1 02:48:29 2020
+++ src/sys/arch/arm/include/ptrace.h	Mon Dec 14 01:58:48 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.16 2020/12/01 02:48:29 rin Exp $	*/
+/*	$NetBSD: ptrace.h,v 1.17 2020/12/14 01:58:48 rin Exp $	*/
 
 /*
  * Copyright (c) 1995 Frank Lancaster
@@ -36,7 +36,8 @@
 /*
  * arm-dependent ptrace definitions
  */
-#ifndef _KERNEL
+#if 0
+/* Exposed to userland for NetBSD 1.6 to 9. Do not reuse for other purpose. */
 #define PT_STEP		(PT_FIRSTMACH + 0) /* Not implemented */
 #endif
 #define	PT_GETREGS	(PT_FIRSTMACH + 1)
@@ -44,21 +45,22 @@
 /* 3 and 4 are for FPE registers */
 #define	PT_GETFPREGS	(PT_FIRSTMACH + 5)
 #define	PT_SETFPREGS	(PT_FIRSTMACH + 6)
-#ifndef _KERNEL
+#if 0
+/* Exposed to userland for NetBSD 8 to 9. Do not reuse for other purpose. */
 #define PT_SETSTEP	(PT_FIRSTMACH + 7) /* Not implemented */
 #define PT_CLEARSTEP	(PT_FIRSTMACH + 8) /* Not implemented */
 #endif
 
 #define PT_MACHDEP_STRINGS \
-	"PT_STEP", \
+	"n/a PT_STEP", \
 	"PT_GETREGS", \
 	"PT_SETREGS", \
 	"old PT_GETFPREGS", \
 	"old PT_SETFPREGS", \
 	"PT_GETFPREGS", \
 	"PT_SETFPREGS", \
-	"PT_SETSTEP", \
-	"PT_CLEARSTEP",
+	"n/a PT_SETSTEP", \
+	"n/a PT_CLEARSTEP",
 
 #include <machine/reg.h>
 #define PTRACE_REG_PC(_r)		(_r)->r_pc

Reply via email to