xref: /freebsd/sys/ddb/db_break.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1dd3cb568SWarner Losh /*-
2*796df753SPedro F. Giffuni  * SPDX-License-Identifier: MIT-CMU
3*796df753SPedro F. Giffuni  *
45b81b6b3SRodney W. Grimes  * Mach Operating System
55b81b6b3SRodney W. Grimes  * Copyright (c) 1991,1990 Carnegie Mellon University
65b81b6b3SRodney W. Grimes  * All Rights Reserved.
75b81b6b3SRodney W. Grimes  *
85b81b6b3SRodney W. Grimes  * Permission to use, copy, modify and distribute this software and its
95b81b6b3SRodney W. Grimes  * documentation is hereby granted, provided that both the copyright
105b81b6b3SRodney W. Grimes  * notice and this permission notice appear in all copies of the
115b81b6b3SRodney W. Grimes  * software, derivative works or modified versions, and any portions
125b81b6b3SRodney W. Grimes  * thereof, and that both notices appear in supporting documentation.
135b81b6b3SRodney W. Grimes  *
145b81b6b3SRodney W. Grimes  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
155b81b6b3SRodney W. Grimes  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
165b81b6b3SRodney W. Grimes  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
175b81b6b3SRodney W. Grimes  *
185b81b6b3SRodney W. Grimes  * Carnegie Mellon requests users of this software to return to
195b81b6b3SRodney W. Grimes  *
205b81b6b3SRodney W. Grimes  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
215b81b6b3SRodney W. Grimes  *  School of Computer Science
225b81b6b3SRodney W. Grimes  *  Carnegie Mellon University
235b81b6b3SRodney W. Grimes  *  Pittsburgh PA 15213-3890
245b81b6b3SRodney W. Grimes  *
255b81b6b3SRodney W. Grimes  * any improvements or extensions that they make and grant Carnegie the
265b81b6b3SRodney W. Grimes  * rights to redistribute these changes.
275b81b6b3SRodney W. Grimes  */
280edf66ecSRodney W. Grimes 
295b81b6b3SRodney W. Grimes /*
305b81b6b3SRodney W. Grimes  *	Author: David B. Golub, Carnegie Mellon University
315b81b6b3SRodney W. Grimes  *	Date:	7/90
325b81b6b3SRodney W. Grimes  */
335b81b6b3SRodney W. Grimes #ifndef _DDB_DB_BREAK_H_
345b81b6b3SRodney W. Grimes #define	_DDB_DB_BREAK_H_
355b81b6b3SRodney W. Grimes 
365b81b6b3SRodney W. Grimes /*
375b81b6b3SRodney W. Grimes  * Breakpoint.
385b81b6b3SRodney W. Grimes  */
395b81b6b3SRodney W. Grimes 
403a0b4f25SDoug Rabson #ifndef BKPT_INST_TYPE
413a0b4f25SDoug Rabson #define	BKPT_INST_TYPE int
423a0b4f25SDoug Rabson #endif
433a0b4f25SDoug Rabson 
445b81b6b3SRodney W. Grimes struct db_breakpoint {
45d43f696cSJake Burkholder 	vm_map_t map;			/* in this map */
465b81b6b3SRodney W. Grimes 	db_addr_t address;		/* set here */
475b81b6b3SRodney W. Grimes 	int	init_count;		/* number of times to skip bkpt */
485b81b6b3SRodney W. Grimes 	int	count;			/* current count */
495b81b6b3SRodney W. Grimes 	int	flags;			/* flags: */
505b81b6b3SRodney W. Grimes #define	BKPT_SINGLE_STEP	0x2	    /* to simulate single step */
515b81b6b3SRodney W. Grimes #define	BKPT_TEMP		0x4	    /* temporary */
523a0b4f25SDoug Rabson 	BKPT_INST_TYPE bkpt_inst;	/* saved instruction at bkpt */
535b81b6b3SRodney W. Grimes 	struct db_breakpoint *link;	/* link in in-use or free chain */
545b81b6b3SRodney W. Grimes };
555b81b6b3SRodney W. Grimes typedef struct db_breakpoint *db_breakpoint_t;
565b81b6b3SRodney W. Grimes 
5714e10f99SAlfred Perlstein void		db_clear_breakpoints(void);
5814e10f99SAlfred Perlstein db_breakpoint_t	db_find_breakpoint_here(db_addr_t addr);
5914e10f99SAlfred Perlstein void		db_set_breakpoints(void);
605b81b6b3SRodney W. Grimes 
614753168fSBruce Evans #endif /* !_DDB_DB_BREAK_H_ */
62