db_break.h revision 108488
1281SN/A/*
2281SN/A * Mach Operating System
3281SN/A * Copyright (c) 1991,1990 Carnegie Mellon University
4281SN/A * All Rights Reserved.
5281SN/A *
61113Sjoehw * Permission to use, copy, modify and distribute this software and its
71113Sjoehw * documentation is hereby granted, provided that both the copyright
81113Sjoehw * notice and this permission notice appear in all copies of the
91113Sjoehw * software, derivative works or modified versions, and any portions
101113Sjoehw * thereof, and that both notices appear in supporting documentation.
111113Sjoehw *
12281SN/A * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
131113Sjoehw * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14281SN/A * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15281SN/A *
16281SN/A * Carnegie Mellon requests users of this software to return to
17281SN/A *
18281SN/A *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
19281SN/A *  School of Computer Science
20281SN/A *  Carnegie Mellon University
21281SN/A *  Pittsburgh PA 15213-3890
22281SN/A *
23281SN/A * any improvements or extensions that they make and grant Carnegie the
24281SN/A * rights to redistribute these changes.
25281SN/A *
26281SN/A * $FreeBSD: head/sys/ddb/db_break.h 108488 2002-12-31 06:51:19Z jake $
27281SN/A */
28281SN/A
29281SN/A/*
30281SN/A *	Author: David B. Golub, Carnegie Mellon University
31281SN/A *	Date:	7/90
32281SN/A */
33281SN/A#ifndef _DDB_DB_BREAK_H_
34281SN/A#define	_DDB_DB_BREAK_H_
35281SN/A
36281SN/A/*
37281SN/A * Breakpoint.
38281SN/A */
39281SN/A
40281SN/A#ifndef BKPT_INST_TYPE
41281SN/A#define BKPT_INST_TYPE int
42281SN/A#endif
43281SN/A
44281SN/Astruct vm_map;
45281SN/A
46281SN/Astruct db_breakpoint {
47281SN/A	struct vm_map *map;			/* in this map */
48281SN/A	db_addr_t address;		/* set here */
49281SN/A	int	init_count;		/* number of times to skip bkpt */
50281SN/A	int	count;			/* current count */
51281SN/A	int	flags;			/* flags: */
52281SN/A#define	BKPT_SINGLE_STEP	0x2	    /* to simulate single step */
53281SN/A#define	BKPT_TEMP		0x4	    /* temporary */
54281SN/A	BKPT_INST_TYPE bkpt_inst;	/* saved instruction at bkpt */
55281SN/A	struct db_breakpoint *link;	/* link in in-use or free chain */
56281SN/A};
57281SN/Atypedef struct db_breakpoint *db_breakpoint_t;
58281SN/A
59281SN/Avoid		db_clear_breakpoints(void);
60281SN/A#ifdef SOFTWARE_SSTEP
61281SN/Avoid		db_delete_temp_breakpoint(db_breakpoint_t);
62281SN/A#endif
63281SN/Adb_breakpoint_t	db_find_breakpoint_here(db_addr_t addr);
64281SN/Avoid		db_set_breakpoints(void);
65281SN/A#ifdef SOFTWARE_SSTEP
66281SN/Adb_breakpoint_t	db_set_temp_breakpoint(db_addr_t);
67281SN/A#endif
68281SN/A
69281SN/A#ifdef ALT_BREAK_TO_DEBUGGER
70281SN/Aint		db_alt_break(int, int *);
71281SN/A#endif
72281SN/A
73281SN/A#endif /* !_DDB_DB_BREAK_H_ */
74281SN/A