diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-11-27 19:57:24 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-11-27 19:57:24 +0000 |
commit | 0ed7bf7b63c6099fc1205fa39502c78fba9d94c0 (patch) | |
tree | 305a037847e752d58307b5307bc7e15b5ef94c58 /sys/arch | |
parent | 5e5b8791118667f1de14d12971ebf359c1488cec (diff) |
Remove ddb single-step load and store counters. Most platforms do not
implement them, and they are of questionable usefulness.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/alpha/db_interface.c | 31 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/db_trace.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/include/db_machdep.h | 5 | ||||
-rw-r--r-- | sys/arch/amd64/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/arm/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/trap.c | 12 | ||||
-rw-r--r-- | sys/arch/hppa/include/db_machdep.h | 14 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/trap.c | 12 | ||||
-rw-r--r-- | sys/arch/hppa64/include/db_machdep.h | 14 | ||||
-rw-r--r-- | sys/arch/i386/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/m68k/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/m88k/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/db_sstep.c | 85 | ||||
-rw-r--r-- | sys/arch/mips64/include/db_machdep.h | 6 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/db_machdep.c | 21 | ||||
-rw-r--r-- | sys/arch/powerpc/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/sh/include/db_machdep.h | 5 | ||||
-rw-r--r-- | sys/arch/sparc/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/include/db_machdep.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/db_interface.c | 83 | ||||
-rw-r--r-- | sys/arch/vax/include/db_machdep.h | 5 |
21 files changed, 40 insertions, 291 deletions
diff --git a/sys/arch/alpha/alpha/db_interface.c b/sys/arch/alpha/alpha/db_interface.c index ad399cc0bca..911621aaf31 100644 --- a/sys/arch/alpha/alpha/db_interface.c +++ b/sys/arch/alpha/alpha/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.16 2004/01/22 17:47:01 miod Exp $ */ +/* $OpenBSD: db_interface.c,v 1.17 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_interface.c,v 1.8 1999/10/12 17:08:57 jdolecek Exp $ */ /* @@ -407,35 +407,6 @@ db_inst_load(ins) return (FALSE); } -boolean_t -db_inst_store(ins) - int ins; -{ - alpha_instruction insn; - - insn.bits = ins; - - /* Stores. */ - if (insn.mem_format.opcode == op_stw || - insn.mem_format.opcode == op_stb || - insn.mem_format.opcode == op_stq_u) - return (TRUE); - if ((insn.mem_format.opcode >= op_stf) && - (insn.mem_format.opcode <= op_stt)) - return (TRUE); - if ((insn.mem_format.opcode >= op_stl) && - (insn.mem_format.opcode <= op_stq_c)) - return (TRUE); - - /* Barriers. */ - if (insn.mem_format.opcode == op_special) { - if (insn.mem_format.displacement == op_mb) - return (TRUE); - } - - return (FALSE); -} - db_addr_t db_branch_taken(ins, pc, regs) int ins; diff --git a/sys/arch/alpha/alpha/db_trace.c b/sys/arch/alpha/alpha/db_trace.c index f18a503e4f0..767485158ab 100644 --- a/sys/arch/alpha/alpha/db_trace.c +++ b/sys/arch/alpha/alpha/db_trace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_trace.c,v 1.14 2003/10/18 20:14:40 jmc Exp $ */ +/* $OpenBSD: db_trace.c,v 1.15 2010/11/27 19:57:23 miod Exp $ */ /* * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -247,7 +247,7 @@ trapframe: * XXX In here we might special case a frame * pointer setup, i.e. mov sp, fp. */ - } else if (inst_load(inst)) + } else if (db_inst_load(inst)) /* clobbers a register */ slot[rega(inst)] = 0; else if (opcode[inst >> 26].opc_fmt == OPC_OP) diff --git a/sys/arch/alpha/include/db_machdep.h b/sys/arch/alpha/include/db_machdep.h index 14b512a0a64..1d2c3e575f0 100644 --- a/sys/arch/alpha/include/db_machdep.h +++ b/sys/arch/alpha/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.19 2005/12/17 07:31:23 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.20 2010/11/27 19:57:23 miod Exp $ */ /* * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -83,7 +83,6 @@ boolean_t db_inst_branch(int); boolean_t db_inst_call(int); boolean_t db_inst_load(int); boolean_t db_inst_return(int); -boolean_t db_inst_store(int); boolean_t db_inst_trap_return(int); boolean_t db_inst_unconditional_flow_transfer(int); u_long db_register_value(db_regs_t *, int); @@ -98,8 +97,6 @@ db_addr_t next_instr_address(db_addr_t, int); #define branch_taken(ins, pc, fun, regs) db_branch_taken((ins), (pc), (regs)) #define inst_branch db_inst_branch #define inst_call db_inst_call -#define inst_load db_inst_load -#define inst_store db_inst_store #endif #endif /* _ALPHA_DB_MACHDEP_H_ */ diff --git a/sys/arch/amd64/include/db_machdep.h b/sys/arch/amd64/include/db_machdep.h index 0016678b523..94f4433dbad 100644 --- a/sys/arch/amd64/include/db_machdep.h +++ b/sys/arch/amd64/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.8 2008/02/11 20:44:09 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.9 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.2 2003/04/29 17:06:04 scw Exp $ */ /* @@ -73,8 +73,6 @@ extern db_regs_t ddb_regs; /* register state */ #define inst_call(ins) (((ins)&0xff) == I_CALL || \ (((ins)&0xff) == I_CALLI && \ ((ins)&0x3800) == 0x1000)) -#define inst_load(ins) 0 -#define inst_store(ins) 0 /* macros for printing OS server dependent task name */ diff --git a/sys/arch/arm/include/db_machdep.h b/sys/arch/arm/include/db_machdep.h index a91664c1708..e85fdac6484 100644 --- a/sys/arch/arm/include/db_machdep.h +++ b/sys/arch/arm/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.5 2005/04/19 15:23:34 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.6 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.5 2001/11/22 18:00:00 thorpej Exp $ */ /* @@ -88,8 +88,6 @@ extern db_regs_t ddb_regs; /* register state */ 0000000f register */ #define inst_branch(ins) (((ins) & 0x0f000000) == 0x0a000000 || \ ((ins) & 0x0fdffff0) == 0x079ff100) -#define inst_load(ins) (0) -#define inst_store(ins) (0) #define inst_unconditional_flow_transfer(ins) \ ((((ins) & INSN_COND_MASK) == INSN_COND_AL) && \ (inst_branch(ins) || inst_call(ins) || inst_return(ins))) 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 <machine/autoconf.h> -#include <machine/db_machdep.h> /* XXX always needed for inst_store() */ #ifdef DDB #ifdef TRAPDEBUG #include <ddb/db_output.h> +#else +#include <machine/db_machdep.h> #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; diff --git a/sys/arch/hppa64/hppa64/trap.c b/sys/arch/hppa64/hppa64/trap.c index 00016918484..c39dc52feff 100644 --- a/sys/arch/hppa64/hppa64/trap.c +++ b/sys/arch/hppa64/hppa64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.10 2010/07/01 04:33:59 jsing Exp $ */ +/* $OpenBSD: trap.c,v 1.11 2010/11/27 19:57:23 miod Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -37,13 +37,21 @@ #include <machine/autoconf.h> #include <machine/psl.h> -#include <machine/db_machdep.h> /* XXX always needed for inst_store() */ #ifdef DDB #ifdef TRAPDEBUG #include <ddb/db_output.h> +#else +#include <machine/db_machdep.h> #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 */ +} + const char *trap_type[] = { "invalid", "HPMC", diff --git a/sys/arch/hppa64/include/db_machdep.h b/sys/arch/hppa64/include/db_machdep.h index 9c90cab7611..4f374e14a0a 100644 --- a/sys/arch/hppa64/include/db_machdep.h +++ b/sys/arch/hppa64/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.2 2010/11/27 19:57:23 miod Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -61,18 +61,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; diff --git a/sys/arch/i386/include/db_machdep.h b/sys/arch/i386/include/db_machdep.h index 1318cc3b317..d375dc9ea02 100644 --- a/sys/arch/i386/include/db_machdep.h +++ b/sys/arch/i386/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.19 2008/02/11 20:44:11 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.20 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.9 1996/05/03 19:23:59 christos Exp $ */ /* @@ -70,8 +70,6 @@ extern db_regs_t ddb_regs; /* register state */ #define inst_call(ins) (((ins)&0xff) == I_CALL || \ (((ins)&0xff) == I_CALLI && \ ((ins)&0x3800) == 0x1000)) -#define inst_load(ins) 0 -#define inst_store(ins) 0 #define DB_MACHINE_COMMANDS diff --git a/sys/arch/m68k/include/db_machdep.h b/sys/arch/m68k/include/db_machdep.h index 69594b86ef0..250d1cf354c 100644 --- a/sys/arch/m68k/include/db_machdep.h +++ b/sys/arch/m68k/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.10 2005/11/13 17:50:44 fgsch Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.11 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.20 1997/06/26 01:26:58 thorpej Exp $ */ /* @@ -84,8 +84,6 @@ extern db_regs_t ddb_regs; /* register state */ #define inst_return(ins) (((ins)&M_RTS) == I_RTS) #define inst_call(ins) (((ins)&M_JSR) == I_JSR || \ ((ins)&M_BSR) == I_BSR) -#define inst_load(ins) 0 -#define inst_store(ins) 0 /* * Things needed by kgdb: diff --git a/sys/arch/m88k/include/db_machdep.h b/sys/arch/m88k/include/db_machdep.h index 2dc076ba5a3..e8c7b74297c 100644 --- a/sys/arch/m88k/include/db_machdep.h +++ b/sys/arch/m88k/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.13 2007/11/14 17:54:24 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.14 2010/11/27 19:57:23 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -62,8 +62,6 @@ typedef struct reg db_regs_t; extern db_regs_t ddb_regs; /* register state */ #define DDB_REGS (&ddb_regs) -int inst_load(u_int); -int inst_store(u_int); int ddb_break_trap(int, db_regs_t *); int ddb_entry_trap(int, db_regs_t *); void m88k_print_instruction(int, u_int, u_int32_t); /* db_disasm.c */ diff --git a/sys/arch/m88k/m88k/db_sstep.c b/sys/arch/m88k/m88k/db_sstep.c index 6fb585bb86f..7c02d3d2f8c 100644 --- a/sys/arch/m88k/m88k/db_sstep.c +++ b/sys/arch/m88k/m88k/db_sstep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_sstep.c,v 1.6 2007/12/09 19:57:50 miod Exp $ */ +/* $OpenBSD: db_sstep.c,v 1.7 2010/11/27 19:57:23 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -43,89 +43,6 @@ */ /* - * inst_load(ins) - * Returns the number of words the instruction loads. byte, - * half and word count as 1; double word as 2 - */ -int -inst_load(u_int ins) -{ - /* look at the top six bits, for starters */ - switch (ins >> (32 - 6)) { - case 0x0: /* xmem byte imm */ - case 0x1: /* xmem word imm */ - case 0x2: /* unsigned half-word load imm */ - case 0x3: /* unsigned byte load imm */ - case 0x5: /* signed word load imm */ - case 0x6: /* signed half-word load imm */ - case 0x7: /* signed byte load imm */ - return (1); - - case 0x4: /* signed double word load imm */ - return (2); - - case 0x3d: /* load/store/xmem scaled/unscaled instruction */ - if ((ins & 0x0000c0e0) == 0x00000000) /* is ld/st/xmem */ - /* look at bits 15-10 */ - switch ((ins & 0x0000fc00) >> 10) { - case 0x0: /* xmem byte */ - case 0x1: /* xmem word */ - case 0x2: /* unsigned half word */ - case 0x3: /* unsigned byte load */ - case 0x5: /* signed word load */ - case 0x6: /* signed half-word load */ - case 0x7: /* signed byte load */ - return (1); - - case 0x4: /* signed double word load */ - return (2); - } - break; - } - - return (0); -} - -/* - * inst_store - * Like inst_load, except for store instructions. - */ -int -inst_store(u_int ins) -{ - /* decode top 6 bits again */ - switch (ins >> (32 - 6)) { - case 0x0: /* xmem byte imm */ - case 0x1: /* xmem word imm */ - case 0x9: /* store word imm */ - case 0xa: /* store half-word imm */ - case 0xb: /* store byte imm */ - return (1); - - case 0x8: /* store double word */ - return (2); - - case 0x3d: /* load/store/xmem scaled/unscaled instruction */ - if ((ins & 0x0000c0e0) == 0x00000000) /* is ld/st/xmem */ - /* look at bits 15-10 */ - switch ((ins & 0x0000fc00) >> 10) { - case 0x0: /* xmem byte imm */ - case 0x1: /* xmem word imm */ - case 0x9: /* store word */ - case 0xa: /* store half-word */ - case 0xb: /* store byte */ - return (1); - - case 0x8: /* store double word */ - return (2); - } - break; - } - - return (0); -} - -/* * We can not use the MI ddb SOFTWARE_SSTEP facility, since the 88110 will use * hardware single stepping. * Moreover, our software single stepping implementation is tailor-made for the diff --git a/sys/arch/mips64/include/db_machdep.h b/sys/arch/mips64/include/db_machdep.h index 0361060620e..26f2d9f4371 100644 --- a/sys/arch/mips64/include/db_machdep.h +++ b/sys/arch/mips64/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.10 2010/09/20 23:37:08 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.11 2010/11/27 19:57:23 miod Exp $ */ /* * Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se) @@ -61,15 +61,11 @@ db_addr_t next_instr_address(db_addr_t, boolean_t); */ #define IT_CALL 0x01 #define IT_BRANCH 0x02 -#define IT_LOAD 0x03 -#define IT_STORE 0x04 #define inst_branch(i) (db_inst_type(i) == IT_BRANCH) #define inst_trap_return(i) ((i) & 0) #define inst_call(i) (db_inst_type(i) == IT_CALL) #define inst_return(i) ((i) == 0x03e00008) -#define inst_load(i) (db_inst_type(i) == IT_LOAD) -#define inst_store(i) (db_inst_type(i) == IT_STORE) int db_inst_type(int); void db_machine_init(void); diff --git a/sys/arch/mips64/mips64/db_machdep.c b/sys/arch/mips64/mips64/db_machdep.c index df8db12cef4..051bf4b8f23 100644 --- a/sys/arch/mips64/mips64/db_machdep.c +++ b/sys/arch/mips64/mips64/db_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.c,v 1.31 2010/09/17 00:25:11 miod Exp $ */ +/* $OpenBSD: db_machdep.c,v 1.32 2010/11/27 19:57:23 miod Exp $ */ /* * Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se) @@ -442,25 +442,6 @@ db_inst_type(ins) break; } break; - - case OP_LB: - case OP_LH: - case OP_LW: - case OP_LD: - case OP_LBU: - case OP_LHU: - case OP_LWU: - case OP_LWC1: - ityp = IT_LOAD; - break; - - case OP_SB: - case OP_SH: - case OP_SW: - case OP_SD: - case OP_SWC1: - ityp = IT_STORE; - break; } return (ityp); } diff --git a/sys/arch/powerpc/include/db_machdep.h b/sys/arch/powerpc/include/db_machdep.h index af3a6400e7b..1f46b301975 100644 --- a/sys/arch/powerpc/include/db_machdep.h +++ b/sys/arch/powerpc/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.22 2008/09/16 04:20:42 drahn Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.23 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */ /* @@ -88,8 +88,6 @@ extern db_regs_t ddb_regs; /* register state */ #define inst_return(ins) (((ins)&M_RTS) == I_RTS) #define inst_call(ins) (((ins)&M_BC ) == I_BC || \ ((ins)&M_B ) == I_B ) -#define inst_load(ins) 0 -#define inst_store(ins) 0 #ifdef _KERNEL diff --git a/sys/arch/sh/include/db_machdep.h b/sys/arch/sh/include/db_machdep.h index c993969352f..8b95aca7269 100644 --- a/sys/arch/sh/include/db_machdep.h +++ b/sys/arch/sh/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.4 2008/02/11 20:44:11 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.5 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.12 2006/05/10 06:24:03 skrll Exp $ */ /* @@ -57,9 +57,6 @@ extern db_regs_t ddb_regs; /* register state */ #define IS_BREAKPOINT_TRAP(type, code) ((type) == EXPEVT_TRAPA) #define IS_WATCHPOINT_TRAP(type, code) (0) /* XXX (msaitoh) */ -#define inst_load(ins) 0 -#define inst_store(ins) 0 - int kdb_trap(int, int, db_regs_t *); void db_machine_init (void); boolean_t inst_call(int); diff --git a/sys/arch/sparc/include/db_machdep.h b/sys/arch/sparc/include/db_machdep.h index 1366775af21..99f948c8aac 100644 --- a/sys/arch/sparc/include/db_machdep.h +++ b/sys/arch/sparc/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.13 2005/11/13 17:50:44 fgsch Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.14 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.10 1997/08/31 21:23:40 pk Exp $ */ /* @@ -78,8 +78,6 @@ extern db_regs_t ddb_regs; /* register state */ #define inst_trap_return(ins) ((ins)&0) #define inst_return(ins) ((ins)&0) #define inst_call(ins) ((ins)&0) -#define inst_load(ins) 0 -#define inst_store(ins) 0 #define DB_MACHINE_COMMANDS diff --git a/sys/arch/sparc64/include/db_machdep.h b/sys/arch/sparc64/include/db_machdep.h index 8691ce60e81..e052a9f8f7d 100644 --- a/sys/arch/sparc64/include/db_machdep.h +++ b/sys/arch/sparc64/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.11 2008/12/14 17:10:44 kettenis Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.12 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.12 2001/07/07 15:16:13 eeh Exp $ */ /* @@ -112,8 +112,6 @@ boolean_t db_inst_trap_return(int inst); boolean_t db_inst_return(int inst); boolean_t db_inst_call(int inst); boolean_t db_inst_branch(int inst); -int db_inst_load(int inst); -int db_inst_store(int inst); boolean_t db_inst_unconditional_flow_transfer(int inst); db_addr_t db_branch_taken(int inst, db_addr_t pc, db_regs_t *regs); void db_machine_init(void); @@ -122,8 +120,6 @@ void db_machine_init(void); #define inst_return(ins) db_inst_return(ins) #define inst_call(ins) db_inst_call(ins) #define inst_branch(ins) db_inst_branch(ins) -#define inst_load(ins) db_inst_load(ins) -#define inst_store(ins) db_inst_store(ins) #define inst_unconditional_flow_transfer(ins) \ db_inst_unconditional_flow_transfer(ins) #define branch_taken(ins, pc, fun, regs) \ diff --git a/sys/arch/sparc64/sparc64/db_interface.c b/sys/arch/sparc64/sparc64/db_interface.c index 5a09cf4dad3..32c3c0dfe64 100644 --- a/sys/arch/sparc64/sparc64/db_interface.c +++ b/sys/arch/sparc64/sparc64/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.29 2010/07/06 02:26:32 guenther Exp $ */ +/* $OpenBSD: db_interface.c,v 1.30 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_interface.c,v 1.61 2001/07/31 06:55:47 eeh Exp $ */ /* @@ -1290,87 +1290,6 @@ db_inst_trap_return(inst) insn.i_op3.i_op3 == IOP3_RETT); } - -int -db_inst_load(inst) - int inst; -{ - union instr insn; - - insn.i_int = inst; - - if (insn.i_any.i_op != IOP_mem) - return 0; - - switch (insn.i_op3.i_op3) { - case IOP3_LD: - case IOP3_LDUB: - case IOP3_LDUH: - case IOP3_LDD: - case IOP3_LDSB: - case IOP3_LDSH: - case IOP3_LDSTUB: - case IOP3_SWAP: - case IOP3_LDA: - case IOP3_LDUBA: - case IOP3_LDUHA: - case IOP3_LDDA: - case IOP3_LDSBA: - case IOP3_LDSHA: - case IOP3_LDSTUBA: - case IOP3_SWAPA: - case IOP3_LDF: - case IOP3_LDFSR: - case IOP3_LDDF: - case IOP3_LFC: - case IOP3_LDCSR: - case IOP3_LDDC: - return 1; - - default: - return 0; - } -} - -int -db_inst_store(inst) - int inst; -{ - union instr insn; - - insn.i_int = inst; - - if (insn.i_any.i_op != IOP_mem) - return 0; - - switch (insn.i_op3.i_op3) { - case IOP3_ST: - case IOP3_STB: - case IOP3_STH: - case IOP3_STD: - case IOP3_LDSTUB: - case IOP3_SWAP: - case IOP3_STA: - case IOP3_STBA: - case IOP3_STHA: - case IOP3_STDA: - case IOP3_LDSTUBA: - case IOP3_SWAPA: - case IOP3_STF: - case IOP3_STFSR: - case IOP3_STQF: - case IOP3_STDF: - case IOP3_STC: - case IOP3_STCSR: - case IOP3_STQFA: - case IOP3_STDC: - return 1; - - default: - return 0; - } -} - void db_machine_init() { diff --git a/sys/arch/vax/include/db_machdep.h b/sys/arch/vax/include/db_machdep.h index 1ba91182883..08917d010e1 100644 --- a/sys/arch/vax/include/db_machdep.h +++ b/sys/arch/vax/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.12 2008/03/30 18:24:02 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.13 2010/11/27 19:57:23 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.6 1998/08/10 14:33:33 ragge Exp $ */ /* @@ -70,9 +70,6 @@ extern db_regs_t ddb_regs; /* register state */ #define inst_return(ins) (((ins)&0xff) == I_RET) #define inst_call(ins) (((ins)&0xff) == I_CALL) -#define inst_load(ins) 0 -#define inst_store(ins) 0 - /* Prototypes */ void kdb_trap(struct trapframe *); |