1
/* This file is part of Malaga, a system for Natural Language Analysis.
2
* Copyright (C) 1995-1999 Bjoern Beutel
5
* Universitaet Erlangen-Nuernberg
6
* Abteilung fuer Computerlinguistik
9
* e-mail: malaga@linguistik.uni-erlangen.de
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
25
/* description ==============================================================*/
27
/* Debugger functions. */
29
/* types ====================================================================*/
31
typedef enum /* debugger modes (set by set_debug_mode) */
33
RUN_MODE, /* ignore breakpoints */
34
GO_MODE, /* stop at breakpoints */
35
WALK_MODE, /* stop at breakpoints and rule starts */
36
NEXT_MODE, /* stop at new source lines; walk over subrules */
37
STEP_MODE /* stop at new source lines */
40
/* variables ================================================================*/
42
GLOBAL bool_t in_debugger; /* TRUE iff in debugger loop. READ ONLY! */
44
/* functions ================================================================*/
46
extern void init_debugger (void (*my_print_rule) (void),
47
command_t *my_debugger_commands[]);
48
/* Initialise the debugger module.
49
* Pass a function <my_print_rule> printing the current rule, and commands
50
* <my_debugger_commands> that can be invoked when debug mode is invoked. */
52
extern void terminate_debugger (void);
53
/* Terminate the run time environment. */
55
extern void set_debug_mode (debug_mode_t debug_mode, rule_sys_t *rule_sys);
56
/* Set debug mode <debug_mode> for <rule_sys>. */
58
/* commands =================================================================*/
60
extern command_t run_command; /* Execute rules in non-debugging mode. */
62
extern command_t go_command; /* Execute rules until breakpoint. */
64
extern command_t walk_command; /* Execute rules until different rule. */
66
extern command_t step_command; /* Execute rules until different line. */
68
extern command_t next_command; /* Execute rules until different line,
69
* but jump over subrules. */
71
extern command_t print_command; /* Print the values of variables. */
73
extern command_t variables_command;
74
/* Generate variables file and start TCL program to display variables. */
76
extern command_t trace_command;
77
/* Print all active subrules and rules in reverse order. */
79
/* end of file ==============================================================*/