1130803Smarcel/* Manages interpreters for GDB, the GNU debugger. 2130803Smarcel 3130803Smarcel Copyright 2000, 2002, 2003 Free Software Foundation, Inc. 4130803Smarcel 5130803Smarcel Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc. 6130803Smarcel 7130803Smarcel This file is part of GDB. 8130803Smarcel 9130803Smarcel This program is free software; you can redistribute it and/or modify 10130803Smarcel it under the terms of the GNU General Public License as published by 11130803Smarcel the Free Software Foundation; either version 2 of the License, or 12130803Smarcel (at your option) any later version. 13130803Smarcel 14130803Smarcel This program is distributed in the hope that it will be useful, 15130803Smarcel but WITHOUT ANY WARRANTY; without even the implied warranty of 16130803Smarcel MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17130803Smarcel GNU General Public License for more details. 18130803Smarcel 19130803Smarcel You should have received a copy of the GNU General Public License 20130803Smarcel along with this program; if not, write to the Free Software 21130803Smarcel Foundation, Inc., 59 Temple Place - Suite 330, 22130803Smarcel Boston, MA 02111-1307, USA. */ 23130803Smarcel 24130803Smarcel#ifndef INTERPS_H 25130803Smarcel#define INTERPS_H 26130803Smarcel 27130803Smarcelstruct ui_out; 28130803Smarcelstruct interp; 29130803Smarcel 30130803Smarcelextern int interp_resume (struct interp *interp); 31130803Smarcelextern int interp_suspend (struct interp *interp); 32130803Smarcelextern int interp_prompt_p (struct interp *interp); 33130803Smarcelextern int interp_exec_p (struct interp *interp); 34130803Smarcelextern int interp_exec (struct interp *interp, const char *command); 35130803Smarcelextern int interp_quiet_p (struct interp *interp); 36130803Smarcel 37130803Smarceltypedef void *(interp_init_ftype) (void); 38130803Smarceltypedef int (interp_resume_ftype) (void *data); 39130803Smarceltypedef int (interp_suspend_ftype) (void *data); 40130803Smarceltypedef int (interp_prompt_p_ftype) (void *data); 41130803Smarceltypedef int (interp_exec_ftype) (void *data, const char *command); 42130803Smarceltypedef void (interp_command_loop_ftype) (void *data); 43130803Smarcel 44130803Smarcelstruct interp_procs 45130803Smarcel{ 46130803Smarcel interp_init_ftype *init_proc; 47130803Smarcel interp_resume_ftype *resume_proc; 48130803Smarcel interp_suspend_ftype *suspend_proc; 49130803Smarcel interp_exec_ftype *exec_proc; 50130803Smarcel interp_prompt_p_ftype *prompt_proc_p; 51130803Smarcel interp_command_loop_ftype *command_loop_proc; 52130803Smarcel}; 53130803Smarcel 54130803Smarcelextern struct interp *interp_new (const char *name, void *data, 55130803Smarcel struct ui_out *uiout, 56130803Smarcel const struct interp_procs *procs); 57130803Smarcelextern void interp_add (struct interp *interp); 58130803Smarcelextern int interp_set (struct interp *interp); 59130803Smarcelextern struct interp *interp_lookup (const char *name); 60130803Smarcelextern struct ui_out *interp_ui_out (struct interp *interp); 61130803Smarcel 62130803Smarcelextern int current_interp_named_p (const char *name); 63130803Smarcelextern int current_interp_display_prompt_p (void); 64130803Smarcelextern void current_interp_command_loop (void); 65130803Smarcel 66130803Smarcelextern void clear_interpreter_hooks (void); 67130803Smarcel 68130803Smarcel/* well-known interpreters */ 69130803Smarcel#define INTERP_CONSOLE "console" 70130803Smarcel#define INTERP_MI1 "mi1" 71130803Smarcel#define INTERP_MI2 "mi2" 72130803Smarcel#define INTERP_MI3 "mi3" 73130803Smarcel#define INTERP_MI "mi" 74130803Smarcel#define INTERP_TUI "tui" 75130803Smarcel 76130803Smarcel#endif 77