From 3d5424fd1c8b6aafe4a38aef592ad0e80d45792d Mon Sep 17 00:00:00 2001 From: rin Date: Mon, 14 Dec 2020 01:58:48 +0000 Subject: [PATCH] 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... --- sys/arch/arm/include/ptrace.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/arch/arm/include/ptrace.h b/sys/arch/arm/include/ptrace.h index ea30b38a9adc..65ee9128af41 100644 --- a/sys/arch/arm/include/ptrace.h +++ b/sys/arch/arm/include/ptrace.h @@ -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 #define PTRACE_REG_PC(_r) (_r)->r_pc