GDB (xrefs)
Loading...
Searching...
No Matches
mi-interp.h
Go to the documentation of this file.
1/* MI Interpreter Definitions and Commands for GDB, the GNU debugger.
2
3 Copyright (C) 2017-2023 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
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.
11
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.
16
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/>. */
19
20#ifndef MI_MI_INTERP_H
21#define MI_MI_INTERP_H
22
23#include "interps.h"
24
25struct mi_console_file;
26
27/* An MI interpreter. */
28
29class mi_interp final : public interp
30{
31public:
32 mi_interp (const char *name)
33 : interp (name)
34 {}
35
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;
44
45 /* MI's output channels */
51
52 /* Raw console output. */
54
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. */
61
62 /* MI's builder. */
64
65 /* MI's CLI builder (wraps OUT). */
67};
68
69/* Output the shared object attributes to UIOUT. */
70
71void mi_output_solib_attribs (ui_out *uiout, struct so_list *solib);
72
73#endif /* MI_MI_INTERP_H */
Definition: interps.h:43
const char * name() const
Definition: interps.h:79
mi_console_file * log
Definition: mi-interp.h:48
ui_out * interp_ui_out() override
Definition: mi-interp.c:1260
void pre_command_loop() override
Definition: mi-interp.c:322
mi_console_file * out
Definition: mi-interp.h:46
void suspend() override
Definition: mi-interp.c:197
mi_console_file * event_channel
Definition: mi-interp.h:50
struct ui_out * mi_uiout
Definition: mi-interp.h:63
struct ui_out * cli_uiout
Definition: mi-interp.h:66
ui_file_up stdout_holder
Definition: mi-interp.h:60
mi_console_file * targ
Definition: mi-interp.h:49
void resume() override
Definition: mi-interp.c:172
struct ui_file * raw_stdout
Definition: mi-interp.h:53
struct ui_file * saved_raw_stdout
Definition: mi-interp.h:58
void set_logging(ui_file_up logfile, bool logging_redirect, bool debug_redirect) override
Definition: mi-interp.c:1269
ui_file_up logfile_holder
Definition: mi-interp.h:59
gdb_exception exec(const char *command_str) override
Definition: mi-interp.c:203
mi_interp(const char *name)
Definition: mi-interp.h:32
void init(bool top_level) override
Definition: mi-interp.c:126
mi_console_file * err
Definition: mi-interp.h:47
Definition: ui-out.h:160
static bool debug_redirect
Definition: cli-logging.c:67
static bool logging_redirect
Definition: cli-logging.c:66
void mi_output_solib_attribs(ui_out *uiout, struct so_list *solib)
Definition: mi-interp.c:1047
Definition: solist.h:35
std::unique_ptr< ui_file > ui_file_up
Definition: ui-file.h:148