db_machdep.h revision 1.2 1 1.2 deraadt /* $NetBSD: db_machdep.h,v 1.2 1994/11/20 20:52:59 deraadt Exp $ */
2 1.2 deraadt
3 1.1 pk /*
4 1.1 pk * Mach Operating System
5 1.1 pk * Copyright (c) 1991,1990 Carnegie Mellon University
6 1.1 pk * All Rights Reserved.
7 1.1 pk *
8 1.1 pk * Permission to use, copy, modify and distribute this software and its
9 1.1 pk * documentation is hereby granted, provided that both the copyright
10 1.1 pk * notice and this permission notice appear in all copies of the
11 1.1 pk * software, derivative works or modified versions, and any portions
12 1.1 pk * thereof, and that both notices appear in supporting documentation.
13 1.1 pk *
14 1.1 pk * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
15 1.1 pk * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
16 1.1 pk * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17 1.1 pk *
18 1.1 pk * Carnegie Mellon requests users of this software to return to
19 1.1 pk *
20 1.1 pk * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
21 1.1 pk * School of Computer Science
22 1.1 pk * Carnegie Mellon University
23 1.1 pk * Pittsburgh PA 15213-3890
24 1.1 pk *
25 1.1 pk * any improvements or extensions that they make and grant Carnegie Mellon
26 1.1 pk * the rights to redistribute these changes.
27 1.1 pk */
28 1.1 pk
29 1.1 pk #ifndef _SPARC_DB_MACHDEP_H_
30 1.1 pk #define _SPARC_DB_MACHDEP_H_
31 1.1 pk
32 1.1 pk /*
33 1.1 pk * Machine-dependent defines for new kernel debugger.
34 1.1 pk */
35 1.1 pk
36 1.1 pk
37 1.1 pk #include <vm/vm_prot.h>
38 1.1 pk #include <vm/vm_param.h>
39 1.1 pk #include <vm/vm_inherit.h>
40 1.1 pk #include <vm/lock.h>
41 1.1 pk #include <machine/frame.h>
42 1.1 pk #include <machine/psl.h>
43 1.1 pk #include <machine/trap.h>
44 1.1 pk #include <machine/reg.h>
45 1.1 pk
46 1.1 pk #define sparc_saved_state trapframe
47 1.1 pk /* end of mangling */
48 1.1 pk
49 1.1 pk typedef vm_offset_t db_addr_t; /* address - unsigned */
50 1.1 pk typedef int db_expr_t; /* expression - signed */
51 1.1 pk
52 1.1 pk typedef struct sparc_saved_state db_regs_t;
53 1.1 pk db_regs_t ddb_regs; /* register state */
54 1.1 pk #define DDB_REGS (&ddb_regs)
55 1.1 pk
56 1.1 pk #define PC_REGS(regs) ((db_addr_t)(regs)->tf_pc)
57 1.1 pk
58 1.1 pk #define BKPT_INST 0x91d02001 /* breakpoint instruction */
59 1.1 pk #define BKPT_SIZE (4) /* size of breakpoint inst */
60 1.1 pk #define BKPT_SET(inst) (BKPT_INST)
61 1.1 pk
62 1.1 pk #define db_clear_single_step(regs) (0)
63 1.1 pk #define db_set_single_step(regs) (0)
64 1.1 pk
65 1.1 pk #define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BREAKPOINT)
66 1.1 pk #define IS_WATCHPOINT_TRAP(type, code) (0)
67 1.1 pk
68 1.1 pk #define inst_trap_return(ins) ((ins)&0)
69 1.1 pk #define inst_return(ins) ((ins)&0)
70 1.1 pk #define inst_call(ins) ((ins)&0)
71 1.1 pk #define inst_load(ins) 0
72 1.1 pk #define inst_store(ins) 0
73 1.1 pk
74 1.1 pk #define DB_MACHINE_COMMANDS
75 1.1 pk
76 1.1 pk #endif /* _SPARC_DB_MACHDEP_H_ */
77