|
|
1.1.1.2 root 1: /*
1.1 root 2: * Mach Operating System
3: * Copyright (c) 1991,1990 Carnegie Mellon University
4: * All Rights Reserved.
1.1.1.2 root 5: *
1.1 root 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.
1.1.1.2 root 11: *
1.1 root 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.
1.1.1.2 root 15: *
1.1 root 16: * Carnegie Mellon requests users of this software to return to
1.1.1.2 root 17: *
1.1 root 18: * Software Distribution Coordinator or [email protected]
19: * School of Computer Science
20: * Carnegie Mellon University
21: * Pittsburgh PA 15213-3890
1.1.1.2 root 22: *
1.1 root 23: * any improvements or extensions that they make and grant Carnegie Mellon
24: * the rights to redistribute these changes.
25: */
26: /*
27: * Author: David B. Golub, Carnegie Mellon University
28: * Date: 7/90
29: */
30: #ifndef _DDB_DB_BREAK_H_
31: #define _DDB_DB_BREAK_H_
32:
33: #include <machine/db_machdep.h>
34: #include <kern/thread.h>
35: #include <kern/task.h>
36: #include <mach/boolean.h>
37:
38: /*
39: * thread list at the same breakpoint address
40: */
41: struct db_thread_breakpoint {
42: vm_offset_t tb_task_thd; /* target task or thread */
43: boolean_t tb_is_task; /* task qualified */
44: short tb_number; /* breakpoint number */
45: short tb_init_count; /* skip count(initial value) */
46: short tb_count; /* current skip count */
47: short tb_cond; /* break condition */
48: struct db_thread_breakpoint *tb_next; /* next chain */
49: };
50:
51: typedef struct db_thread_breakpoint *db_thread_breakpoint_t;
52:
53: /*
54: * Breakpoint.
55: */
56:
57: struct db_breakpoint {
58: task_t task; /* target task */
59: db_addr_t address; /* set here */
60: db_thread_breakpoint_t threads; /* thread */
61: int flags; /* flags: */
62: #define BKPT_SINGLE_STEP 0x2 /* to simulate single step */
63: #define BKPT_TEMP 0x4 /* temporary */
64: #define BKPT_USR_GLOBAL 0x8 /* global user space break point */
65: #define BKPT_SET_IN_MEM 0x10 /* break point is set in memory */
66: #define BKPT_1ST_SET 0x20 /* 1st time set of user global bkpt */
1.1.1.3 root 67: #define BKPT_EXTERNAL 0x40 /* break point is not from ddb */
1.1 root 68: vm_size_t bkpt_inst; /* saved instruction at bkpt */
69: struct db_breakpoint *link; /* link in in-use or free chain */
70: };
71:
72: typedef struct db_breakpoint *db_breakpoint_t;
73:
1.1.1.4 ! root 74: extern db_breakpoint_t db_find_breakpoint( const task_t task, db_addr_t addr) __attribute__ ((pure));
! 75: extern boolean_t db_find_breakpoint_here( const task_t task, db_addr_t addr);
1.1.1.3 root 76: extern void db_set_breakpoints(void);
77: extern void db_clear_breakpoints(void);
1.1 root 78: extern db_thread_breakpoint_t db_find_thread_breakpoint_here
1.1.1.4 ! root 79: ( const task_t task, db_addr_t addr );
1.1 root 80: extern db_thread_breakpoint_t db_find_breakpoint_number
81: ( int num, db_breakpoint_t *bkptp);
82:
83: extern db_breakpoint_t db_set_temp_breakpoint( task_t task, db_addr_t addr);
84: extern void db_delete_temp_breakpoint
85: ( task_t task, db_breakpoint_t bkpt);
86:
1.1.1.4 ! root 87: extern db_breakpoint_t db_set_breakpoint(const task_t task, db_addr_t addr,
! 88: int count, const thread_t thread,
1.1.1.3 root 89: boolean_t task_bpt);
90:
1.1.1.4 ! root 91: void db_listbreak_cmd(void);
1.1.1.3 root 92:
1.1.1.4 ! root 93: void db_delete_cmd(void);
1.1.1.3 root 94:
95: void db_breakpoint_cmd(
96: db_expr_t addr,
97: int have_addr,
98: db_expr_t count,
1.1.1.4 ! root 99: const char * modif);
! 100:
! 101: extern void db_check_breakpoint_valid(void);
1.1.1.3 root 102:
1.1.1.2 root 103: #endif /* _DDB_DB_BREAK_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.