db_break.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* $OpenBSD: db_break.h,v 1.9 2010/11/27 19:59:11 miod Exp $ */
  2. /* $NetBSD: db_break.h,v 1.8 1996/02/05 01:56:52 christos Exp $ */
  3. /*
  4. * Mach Operating System
  5. * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University
  6. * All Rights Reserved.
  7. *
  8. * Permission to use, copy, modify and distribute this software and its
  9. * documentation is hereby granted, provided that both the copyright
  10. * notice and this permission notice appear in all copies of the
  11. * software, derivative works or modified versions, and any portions
  12. * thereof, and that both notices appear in supporting documentation.
  13. *
  14. * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  15. * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  16. * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  17. *
  18. * Carnegie Mellon requests users of this software to return to
  19. *
  20. * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
  21. * School of Computer Science
  22. * Carnegie Mellon University
  23. * Pittsburgh PA 15213-3890
  24. *
  25. * any improvements or extensions that they make and grant Carnegie Mellon
  26. * the rights to redistribute these changes.
  27. *
  28. * Author: David B. Golub, Carnegie Mellon University
  29. * Date: 7/90
  30. */
  31. #ifndef _DDB_DB_BREAK_H_
  32. #define _DDB_DB_BREAK_H_
  33. #include <uvm/uvm_extern.h>
  34. /*
  35. * Breakpoints.
  36. */
  37. typedef struct db_breakpoint {
  38. db_addr_t address; /* set here */
  39. int init_count; /* number of times to skip bkpt */
  40. int count; /* current count */
  41. int flags; /* flags: */
  42. #define BKPT_SINGLE_STEP 0x2 /* to simulate single step */
  43. #define BKPT_TEMP 0x4 /* temporary */
  44. int bkpt_inst; /* saved instruction at bkpt */
  45. struct db_breakpoint *link; /* link in in-use or free chain */
  46. } *db_breakpoint_t;
  47. db_breakpoint_t db_breakpoint_alloc(void);
  48. void db_breakpoint_free(db_breakpoint_t);
  49. void db_set_breakpoint(db_addr_t, int);
  50. void db_delete_breakpoint(db_addr_t);
  51. db_breakpoint_t db_find_breakpoint(db_addr_t);
  52. void db_set_breakpoints(void);
  53. void db_clear_breakpoints(void);
  54. db_breakpoint_t db_set_temp_breakpoint(db_addr_t);
  55. void db_delete_temp_breakpoint(db_breakpoint_t);
  56. void db_list_breakpoints(void);
  57. void db_delete_cmd(db_expr_t, int, db_expr_t, char *);
  58. void db_breakpoint_cmd(db_expr_t, int, db_expr_t, char *);
  59. void db_listbreak_cmd(db_expr_t, int, db_expr_t, char *);
  60. #endif /* _DDB_DB_BREAK_H_ */