From 0ed7bf7b63c6099fc1205fa39502c78fba9d94c0 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 27 Nov 2010 19:57:24 +0000 Subject: Remove ddb single-step load and store counters. Most platforms do not implement them, and they are of questionable usefulness. --- sys/arch/hppa/hppa/trap.c | 12 ++++++++++-- sys/arch/hppa/include/db_machdep.h | 14 +------------- 2 files changed, 11 insertions(+), 15 deletions(-) (limited to 'sys/arch/hppa') diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index 1b202152465..afacb556abd 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.110 2010/07/01 05:33:32 jsing Exp $ */ +/* $OpenBSD: trap.c,v 1.111 2010/11/27 19:57:23 miod Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -45,13 +45,21 @@ #include -#include /* XXX always needed for inst_store() */ #ifdef DDB #ifdef TRAPDEBUG #include +#else +#include #endif #endif +static __inline int inst_store(u_int ins) { + return (ins & 0xf0000000) == 0x60000000 || /* st */ + (ins & 0xf4000200) == 0x24000200 || /* fst/cst */ + (ins & 0xfc000200) == 0x0c000200 || /* stby */ + (ins & 0xfc0003c0) == 0x0c0001c0; /* ldcw */ +} + int pcxs_unaligned(u_int opcode, vaddr_t va); #ifdef PTRACE void ss_clear_breakpoints(struct proc *p); diff --git a/sys/arch/hppa/include/db_machdep.h b/sys/arch/hppa/include/db_machdep.h index 90ccff8dd3b..141501fc0f6 100644 --- a/sys/arch/hppa/include/db_machdep.h +++ b/sys/arch/hppa/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.15 2005/04/19 15:23:07 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.16 2010/11/27 19:57:23 miod Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -72,18 +72,6 @@ static __inline int inst_branch(u_int ins) { (ins & 0xf0000000) == 0xa0000000 || (ins & 0xf0000000) == 0x80000000; } -static __inline int inst_load(u_int ins) { - return (ins & 0xf0000000) == 0x40000000 || - (ins & 0xf4000200) == 0x24000000 || - (ins & 0xfc000200) == 0x0c000000 || - (ins & 0xfc001fc0) != 0x0c0011c0; -} -static __inline int inst_store(u_int ins) { - return (ins & 0xf0000000) == 0x60000000 || /* st */ - (ins & 0xf4000200) == 0x24000200 || /* fst/cst */ - (ins & 0xfc000200) == 0x0c000200 || /* stby */ - (ins & 0xfc0003c0) == 0x0c0001c0; /* ldcw */ -} static __inline int inst_return(u_int ins) { return (ins & 0xfc00e000) == 0xe800c000 || (ins & 0xfc000000) == 0xe0000000; -- cgit v1.2.3