Update copyright year range in header of all files managed by GDB
[binutils-gdb.git] / gdb / mi / mi-interp.h
blob827297f02e24a60b9218339413a4230c1490693c
1 /* MI Interpreter Definitions and Commands for GDB, the GNU debugger.
3 Copyright (C) 2017-2023 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef MI_MI_INTERP_H
21 #define MI_MI_INTERP_H
23 #include "interps.h"
25 struct mi_console_file;
27 /* An MI interpreter. */
29 class mi_interp final : public interp
31 public:
32 mi_interp (const char *name)
33 : interp (name)
36 void init (bool top_level) override;
37 void resume () override;
38 void suspend () override;
39 gdb_exception exec (const char *command_str) override;
40 ui_out *interp_ui_out () override;
41 void set_logging (ui_file_up logfile, bool logging_redirect,
42 bool debug_redirect) override;
43 void pre_command_loop () override;
45 /* MI's output channels */
46 mi_console_file *out;
47 mi_console_file *err;
48 mi_console_file *log;
49 mi_console_file *targ;
50 mi_console_file *event_channel;
52 /* Raw console output. */
53 struct ui_file *raw_stdout;
55 /* Save the original value of raw_stdout here when logging, and the
56 file which we need to delete, so we can restore correctly when
57 done. */
58 struct ui_file *saved_raw_stdout;
59 ui_file_up logfile_holder;
60 ui_file_up stdout_holder;
62 /* MI's builder. */
63 struct ui_out *mi_uiout;
65 /* MI's CLI builder (wraps OUT). */
66 struct ui_out *cli_uiout;
69 /* Output the shared object attributes to UIOUT. */
71 void mi_output_solib_attribs (ui_out *uiout, struct so_list *solib);
73 #endif /* MI_MI_INTERP_H */