FreeBSD/Linux Kernel Cross Reference
sys/ddb/db_watch.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993,1991,1990 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: db_watch.h,v $
29 * Revision 2.6 93/11/17 16:27:01 dbg
30 * Added ANSI function prototypes.
31 * [93/10/11 dbg]
32 *
33 * Revision 2.5 91/10/09 16:04:47 af
34 * Changed "map" field of db_watchpoint structure to "task",
35 * and also changed parameters of function declarations.
36 * [91/08/29 tak]
37 *
38 * Revision 2.4 91/05/14 15:37:46 mrt
39 * Correcting copyright
40 *
41 * Revision 2.3 91/02/05 17:07:31 mrt
42 * Changed to new Mach copyright
43 * [91/01/31 16:20:09 mrt]
44 *
45 * Revision 2.2 90/10/25 14:44:21 rwd
46 * Generalized the watchpoint support.
47 * [90/10/16 rwd]
48 * Created.
49 * [90/10/16 rpd]
50 *
51 */
52 /*
53 * Author: David B. Golub, Carnegie Mellon University
54 * Date: 10/90
55 */
56
57 #ifndef _DDB_DB_WATCH_H_
58 #define _DDB_DB_WATCH_H_
59
60 #include <mach/machine/vm_types.h>
61 #include <kern/task.h>
62 #include <vm/vm_map.h>
63 #include <machine/db_machdep.h>
64
65 /*
66 * Watchpoint.
67 */
68
69 typedef struct db_watchpoint {
70 task_t task; /* in this map */
71 db_addr_t loaddr; /* from this address */
72 db_addr_t hiaddr; /* to this address */
73 struct db_watchpoint *link; /* link in in-use or free chain */
74 } *db_watchpoint_t;
75
76 /*
77 * Quick check for enabled watchpoints.
78 */
79 extern boolean_t db_watchpoints_inserted;
80 extern db_watchpoint_t db_watchpoint_list;
81
82 #define db_watchpoints_enabled() \
83 (db_watchpoint_list != 0 && db_watchpoints_inserted)
84
85 extern boolean_t
86 db_find_watchpoint(
87 vm_map_t map,
88 db_addr_t addr,
89 db_regs_t * regs);
90
91 extern void db_set_watchpoints(void);
92 extern void db_clear_watchpoints(void);
93
94 extern void
95 db_set_watchpoint(
96 task_t task,
97 db_addr_t addr,
98 vm_size_t size);
99
100 extern void
101 db_delete_watchpoint(
102 task_t task,
103 db_addr_t addr);
104
105 extern void
106 db_watchpoint_cmd(
107 db_expr_t addr,
108 int have_addr,
109 db_expr_t count,
110 char * modif);
111
112 extern void
113 db_deletewatch_cmd(
114 db_expr_t addr,
115 int have_addr,
116 db_expr_t count,
117 char * modif);
118
119 extern void db_listwatch_cmd();
120
121 #endif /* _DDB_DB_WATCH_H_ */
Cache object: a7a0df44c4f6ab6236774b1f9b866af7
|