1139747Simp/*-
24Srgrimes * Mach Operating System
34Srgrimes * Copyright (c) 1991,1990 Carnegie Mellon University
44Srgrimes * All Rights Reserved.
58876Srgrimes *
64Srgrimes * Permission to use, copy, modify and distribute this software and its
74Srgrimes * documentation is hereby granted, provided that both the copyright
84Srgrimes * notice and this permission notice appear in all copies of the
94Srgrimes * software, derivative works or modified versions, and any portions
104Srgrimes * thereof, and that both notices appear in supporting documentation.
118876Srgrimes *
128876Srgrimes * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
134Srgrimes * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
144Srgrimes * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
158876Srgrimes *
164Srgrimes * Carnegie Mellon requests users of this software to return to
178876Srgrimes *
184Srgrimes *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
194Srgrimes *  School of Computer Science
204Srgrimes *  Carnegie Mellon University
214Srgrimes *  Pittsburgh PA 15213-3890
228876Srgrimes *
234Srgrimes * any improvements or extensions that they make and grant Carnegie the
244Srgrimes * rights to redistribute these changes.
254Srgrimes *
2650477Speter * $FreeBSD$
274Srgrimes */
28623Srgrimes
294Srgrimes/*
304Srgrimes *	Author: David B. Golub, Carnegie Mellon University
314Srgrimes *	Date:	7/90
324Srgrimes */
3312472Sbde#ifndef _DDB_DB_BREAK_H_
344Srgrimes#define	_DDB_DB_BREAK_H_
354Srgrimes
364Srgrimes/*
374Srgrimes * Breakpoint.
384Srgrimes */
394Srgrimes
4083506Sdfr#ifndef BKPT_INST_TYPE
41264210Spfg#define	BKPT_INST_TYPE int
4283506Sdfr#endif
4383506Sdfr
444Srgrimesstruct db_breakpoint {
45108512Sjake	vm_map_t map;			/* in this map */
464Srgrimes	db_addr_t address;		/* set here */
474Srgrimes	int	init_count;		/* number of times to skip bkpt */
484Srgrimes	int	count;			/* current count */
494Srgrimes	int	flags;			/* flags: */
504Srgrimes#define	BKPT_SINGLE_STEP	0x2	    /* to simulate single step */
514Srgrimes#define	BKPT_TEMP		0x4	    /* temporary */
5283506Sdfr	BKPT_INST_TYPE bkpt_inst;	/* saved instruction at bkpt */
534Srgrimes	struct db_breakpoint *link;	/* link in in-use or free chain */
544Srgrimes};
554Srgrimestypedef struct db_breakpoint *db_breakpoint_t;
564Srgrimes
5792756Salfredvoid		db_clear_breakpoints(void);
5836746Sbde#ifdef SOFTWARE_SSTEP
5992756Salfredvoid		db_delete_temp_breakpoint(db_breakpoint_t);
6036746Sbde#endif
6192756Salfreddb_breakpoint_t	db_find_breakpoint_here(db_addr_t addr);
6292756Salfredvoid		db_set_breakpoints(void);
6336746Sbde#ifdef SOFTWARE_SSTEP
6492756Salfreddb_breakpoint_t	db_set_temp_breakpoint(db_addr_t);
6536746Sbde#endif
664Srgrimes
6712472Sbde#endif /* !_DDB_DB_BREAK_H_ */
68