From f43e7512ab84caaf095e3d076e3b056818701c5e Mon Sep 17 00:00:00 2001 From: Mike Hibler Date: Tue, 31 May 1994 21:46:36 -0800 Subject: [PATCH] make ptrace calls work correctly for hp300 SCCS-vsn: usr.bin/pascal/pdx/process/ptrace.c 8.3 --- usr/src/usr.bin/pascal/pdx/process/ptrace.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/usr/src/usr.bin/pascal/pdx/process/ptrace.c b/usr/src/usr.bin/pascal/pdx/process/ptrace.c index 0ffc2ff9a5..4b67e86457 100644 --- a/usr/src/usr.bin/pascal/pdx/process/ptrace.c +++ b/usr/src/usr.bin/pascal/pdx/process/ptrace.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ptrace.c 8.2 (Berkeley) %G%"; +static char sccsid[] = "@(#)ptrace.c 8.3 (Berkeley) %G%"; #endif /* not lint */ /* @@ -27,8 +27,14 @@ static char sccsid[] = "@(#)ptrace.c 8.2 (Berkeley) %G%"; # include "pxinfo.h" #ifdef mc68000 +#if defined(hp300) || defined(luna68k) +#include +# define U_PAGE 0xfff00000 +# define U_AR0 (int)&((struct user *)0)->u_ar0 +#else # define U_PAGE 0x2400 # define U_AR0 (14*sizeof(int)) +#endif LOCAL int ar0val = -1; #endif @@ -40,8 +46,13 @@ static char sccsid[] = "@(#)ptrace.c 8.2 (Berkeley) %G%"; #if defined(vax) || defined(tahoe) # define regloc(reg) (ctob(UPAGES) + ( sizeof(int) * (reg) )) #else +#if defined(hp300) || defined(luna68k) +# define regloc(reg) \ + (ar0val + ( sizeof(int) * (reg) + ((reg) >= PS ? 2 : 0) )) +#else # define regloc(reg) (ar0val + ( sizeof(int) * (reg) )) #endif +#endif #define WMASK (~(sizeof(WORD) - 1)) #define cachehash(addr) ((unsigned) ((addr >> 2) % CSIZE)) -- 2.20.1