1: /*
2: * $Id: mdebug.h,v 1.6 2025/05/01 17:02:30 snw Exp $
3: * debugger enhancements
4: *
5: *
6: * Author: Serena Willis <snw@coherent-logic.com>
7: * Copyright (C) 1998 MUG Deutschland
8: * Copyright (C) 2020, 2025 Coherent Logic Development LLC
9: *
10: *
11: * This file is part of FreeM.
12: *
13: * FreeM is free software: you can redistribute it and/or modify
14: * it under the terms of the GNU Affero Public License as published by
15: * the Free Software Foundation, either version 3 of the License, or
16: * (at your option) any later version.
17: *
18: * FreeM is distributed in the hope that it will be useful,
19: * but WITHOUT ANY WARRANTY; without even the implied warranty of
20: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21: * GNU Affero Public License for more details.
22: *
23: * You should have received a copy of the GNU Affero Public License
24: * along with FreeM. If not, see <https://www.gnu.org/licenses/>.
25: *
26: * $Log: mdebug.h,v $
27: * Revision 1.6 2025/05/01 17:02:30 snw
28: * Further debugging improvements
29: *
30: * Revision 1.5 2025/04/30 14:41:03 snw
31: * Further debugger work
32: *
33: * Revision 1.4 2025/04/29 18:46:17 snw
34: * Begin work on interactive debugger
35: *
36: * Revision 1.3 2025/03/09 19:50:47 snw
37: * Second phase of REUSE compliance and header reformat
38: *
39: *
40: * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
41: * SPDX-License-Identifier: AGPL-3.0-or-later
42: **/
43:
44: #if !defined(_MDEBUG_H)
45: #define _MDEBUG_H
46:
47: #define MAXWATCH 100
48:
49: #define DEBENTRY_CMD 0
50: #define DEBENTRY_LINE 1
51: #define DEBENTRY_BREAKPOINT 2
52: #define DEBENTRY_ERROR 4
53: #define DEBENTRY_SIGINT 5
54:
55: #define STEPMODE_NONE 0
56: #define STEPMODE_CONT 1
57: #define STEPMODE_CMD 2
58: #define STEPMODE_LINE 3
59:
60: typedef struct dbg_watch {
61:
62: /* name of variable to watch */
63: char *varnam;
64:
65: /* number of changes to this variable */
66: int chgct;
67:
68: /* pending fires */
69: int firect;
70:
71:
72: } dbg_watch;
73:
74: extern void dbg_init (void);
75: extern int debugger (int entry_mode, char *entryref);
76: extern dbg_watch *dbg_add_watch (char *varnam);
77: extern void dbg_remove_watch (char *varnam);
78: extern dbg_watch *dbg_find_watch (char *varnam);
79: extern void dbg_dump_watch (char *varnam);
80: extern char *dbg_get_watch_name (char *varnam);
81: extern void dbg_fire_watch (char *varnam);
82: extern void dbg_dump_watchlist (void);
83:
84:
85: extern short dbg_enable_watch; /* 0 = watches disabled, 1 = watches enabled */
86: extern int dbg_pending_watches;
87:
88: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>