* configure.ac: Switch license to GPLv3.
[deliverable/binutils-gdb.git] / gdb / interps.h
CommitLineData
4a8f6654
AC
1/* Manages interpreters for GDB, the GNU debugger.
2
6aba47ca 3 Copyright (C) 2000, 2002, 2003, 2007 Free Software Foundation, Inc.
4a8f6654
AC
4
5 Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc.
6
7 This file is part of GDB.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
197e01b6
EZ
21 Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA. */
4a8f6654
AC
23
24#ifndef INTERPS_H
25#define INTERPS_H
26
c1043fc2
AC
27#include "exceptions.h"
28
4a8f6654
AC
29struct ui_out;
30struct interp;
31
32extern int interp_resume (struct interp *interp);
33extern int interp_suspend (struct interp *interp);
34extern int interp_prompt_p (struct interp *interp);
35extern int interp_exec_p (struct interp *interp);
71fff37b
AC
36extern struct gdb_exception interp_exec (struct interp *interp,
37 const char *command);
4a8f6654
AC
38extern int interp_quiet_p (struct interp *interp);
39
40typedef void *(interp_init_ftype) (void);
41typedef int (interp_resume_ftype) (void *data);
42typedef int (interp_suspend_ftype) (void *data);
43typedef int (interp_prompt_p_ftype) (void *data);
71fff37b
AC
44typedef struct gdb_exception (interp_exec_ftype) (void *data,
45 const char *command);
1cdac4ef 46typedef void (interp_command_loop_ftype) (void *data);
4a8f6654
AC
47
48struct interp_procs
49{
50 interp_init_ftype *init_proc;
51 interp_resume_ftype *resume_proc;
52 interp_suspend_ftype *suspend_proc;
53 interp_exec_ftype *exec_proc;
54 interp_prompt_p_ftype *prompt_proc_p;
55 interp_command_loop_ftype *command_loop_proc;
56};
57
58extern struct interp *interp_new (const char *name, void *data,
59 struct ui_out *uiout,
60 const struct interp_procs *procs);
61extern void interp_add (struct interp *interp);
62extern int interp_set (struct interp *interp);
63extern struct interp *interp_lookup (const char *name);
64extern struct ui_out *interp_ui_out (struct interp *interp);
65
66extern int current_interp_named_p (const char *name);
67extern int current_interp_display_prompt_p (void);
68extern void current_interp_command_loop (void);
69
b9362cc7 70extern void clear_interpreter_hooks (void);
4a8f6654
AC
71
72/* well-known interpreters */
73#define INTERP_CONSOLE "console"
74#define INTERP_MI1 "mi1"
2fcf52f0
AC
75#define INTERP_MI2 "mi2"
76#define INTERP_MI3 "mi3"
4a8f6654 77#define INTERP_MI "mi"
226361c4 78#define INTERP_TUI "tui"
cc4349ed 79#define INTERP_INSIGHT "insight"
4a8f6654
AC
80
81#endif
This page took 0.395628 seconds and 4 git commands to generate.