mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-14 04:43:38 +08:00
4801a9a356
2011-09-12 Pedro Alves <pedro@codesourcery.com> Matt Rice <ratmice@gmail.com> PR gdb/13175 * interps.c (struct interp) <interpreter_out>: Delete field. (interp_new): Remove the data and uiout parameters and adjust. (interp_set): Only set the current_uiout from the interpreter's uiout after initializing the interpreter. Adjust call to init_proc. (interp_ui_out): Adjust to call procs->ui_out_proc. (interp_data, interp_name): New. * interps.h (interp_init_ftype): Add `self' parameter. (interp_ui_out_ftype): New typedef. (struct interp_procs) <ui_out_proc>: New method pointer. (interp_new): Remove the data and uiout parameters. (interp_data, interp_name): Declare. * tui/tui-interp.c (tui_init): Adjust prototype. (tui_ui_out): New. (_initialize_tui_interp): Install tui_ui_out. Don't instanciate tui_out here. Adjust call to interp_new. * tui/tui-io.c (tui_initialize_io): Don't set current_uiout here. * cli/cli-interp.c (cli_interpreter_init): Adjust prototype. (cli_ui_out): New. (_initialize_cli_interp): Install it. Adjust call to interp_new. * mi/mi-common.h (struct mi_interp) <uiout>: New field. * mi/mi-interp.c (mi_interpreter_init): Adjust prototype. Initialize mi->uiout depending on the mi_version as extracted from the interpreter's name. (mi_ui_out): New. (_initialize_mi_interp): Install mi_ui_out. Adjust calls to interp_new. Don't allocate the ui_out's of the interpreters here. gdb/testsuite/ 2011-09-12 Matt Rice <ratmice@gmail.com> Pedro Alves <pedro@codesourcery.com> PR gdb/13175 * gdb.base/interp.exp: New tests. * gdb.base/interp.c: New file.
65 lines
1.9 KiB
C
65 lines
1.9 KiB
C
/* Interface for common GDB/MI data
|
|
Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011
|
|
Free Software Foundation, 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 3 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, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef MI_COMMON_H
|
|
#define MI_COMMON_H
|
|
|
|
/* Represents the reason why GDB is sending an asynchronous command to
|
|
the front end. NOTE: When modifing this, don't forget to update
|
|
gdb.texinfo! */
|
|
enum async_reply_reason
|
|
{
|
|
EXEC_ASYNC_BREAKPOINT_HIT = 0,
|
|
EXEC_ASYNC_WATCHPOINT_TRIGGER,
|
|
EXEC_ASYNC_READ_WATCHPOINT_TRIGGER,
|
|
EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER,
|
|
EXEC_ASYNC_FUNCTION_FINISHED,
|
|
EXEC_ASYNC_LOCATION_REACHED,
|
|
EXEC_ASYNC_WATCHPOINT_SCOPE,
|
|
EXEC_ASYNC_END_STEPPING_RANGE,
|
|
EXEC_ASYNC_EXITED_SIGNALLED,
|
|
EXEC_ASYNC_EXITED,
|
|
EXEC_ASYNC_EXITED_NORMALLY,
|
|
EXEC_ASYNC_SIGNAL_RECEIVED,
|
|
/* This is here only to represent the number of enums. */
|
|
EXEC_ASYNC_LAST
|
|
};
|
|
|
|
const char *async_reason_lookup (enum async_reply_reason reason);
|
|
|
|
struct mi_interp
|
|
{
|
|
/* MI's output channels */
|
|
struct ui_file *out;
|
|
struct ui_file *err;
|
|
struct ui_file *log;
|
|
struct ui_file *targ;
|
|
struct ui_file *event_channel;
|
|
|
|
/* MI's builder. */
|
|
struct ui_out *uiout;
|
|
|
|
/* This is the interpreter for the mi... */
|
|
struct interp *mi2_interp;
|
|
struct interp *mi1_interp;
|
|
struct interp *mi_interp;
|
|
};
|
|
|
|
#endif
|