1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/* Manages interpreters for gdb.
Copyright 2000,2002 Free Software Foundation, Inc.
Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef GDB_INTERPRETER_H
#define GDB_INTERPRETER_H
typedef int (*interp_init_ftype) (void *data);
typedef int (*interp_resume_ftype) (void *data);
typedef int (*interp_do_one_event_ftype) (void *data);
typedef int (*interp_suspend_ftype) (void *data);
typedef int (*interp_delete_ftype) (void *data);
typedef int (*interp_prompt_ftype) (void *data, char *new_prompt);
typedef int (*interp_exec_ftype) (void *data, char *command);
struct ui_out;
struct gdb_interpreter;
struct gdb_interpreter_procs
{
interp_init_ftype init_proc;
interp_resume_ftype resume_proc;
interp_do_one_event_ftype do_one_event_proc;
interp_suspend_ftype suspend_proc;
interp_delete_ftype delete_proc;
interp_exec_ftype exec_proc;
interp_prompt_ftype prompt_proc;
};
extern struct gdb_interpreter
*gdb_new_interpreter (char *name, void *data, struct ui_out *uiout,
struct gdb_interpreter_procs *procs);
extern int gdb_add_interpreter (struct gdb_interpreter *interp);
extern int gdb_delete_interpreter (struct gdb_interpreter *interp);
extern int gdb_set_interpreter (struct gdb_interpreter *interp);
extern struct gdb_interpreter *gdb_lookup_interpreter (char *name);
extern struct gdb_interpreter *gdb_current_interpreter ();
extern struct ui_out *gdb_interpreter_ui_out (struct gdb_interpreter *interp);
extern int gdb_current_interpreter_is_named (char *interp_name);
extern int gdb_interpreter_exec (char *command_str);
extern int gdb_interpreter_display_prompt (char *new_prompt);
extern int gdb_interpreter_set_quiet (struct gdb_interpreter *interp,
int quiet);
extern int gdb_interpreter_is_quiet (struct gdb_interpreter *interp);
extern struct gdb_interpreter_procs *gdb_interpreter_get_procs (struct gdb_interpreter *interp);
extern void *gdb_interpreter_get_data (struct gdb_interpreter *interp);
extern int interpreter_do_one_event ();
void clear_interpreter_hooks ();
/* well-known interpreters */
#define GDB_INTERPRETER_CONSOLE "console"
#define GDB_INTERPRETER_MI "mi"
#define GDB_INTERPRETER_MI0 "mi0"
#endif /* GDB_INTERPRETER_H */
|