gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / mi / mi-common.h
CommitLineData
034dad6f 1/* Interface for common GDB/MI data
b811d2c2 2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
034dad6f
BR
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
a9762ec7 8 the Free Software Foundation; either version 3 of the License, or
034dad6f
BR
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
a9762ec7 17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
034dad6f 18
1a5c2598
TT
19#ifndef MI_MI_COMMON_H
20#define MI_MI_COMMON_H
034dad6f 21
d6f9b0fb
PA
22#include "interps.h"
23
d7e74731
PA
24struct mi_console_file;
25
9a2b4c1b
MS
26/* Represents the reason why GDB is sending an asynchronous command to
27 the front end. NOTE: When modifing this, don't forget to update
28 gdb.texinfo! */
034dad6f
BR
29enum async_reply_reason
30{
31 EXEC_ASYNC_BREAKPOINT_HIT = 0,
32 EXEC_ASYNC_WATCHPOINT_TRIGGER,
33 EXEC_ASYNC_READ_WATCHPOINT_TRIGGER,
34 EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER,
35 EXEC_ASYNC_FUNCTION_FINISHED,
36 EXEC_ASYNC_LOCATION_REACHED,
37 EXEC_ASYNC_WATCHPOINT_SCOPE,
38 EXEC_ASYNC_END_STEPPING_RANGE,
39 EXEC_ASYNC_EXITED_SIGNALLED,
40 EXEC_ASYNC_EXITED,
41 EXEC_ASYNC_EXITED_NORMALLY,
42 EXEC_ASYNC_SIGNAL_RECEIVED,
36dfb11c
TT
43 EXEC_ASYNC_SOLIB_EVENT,
44 EXEC_ASYNC_FORK,
45 EXEC_ASYNC_VFORK,
46 EXEC_ASYNC_SYSCALL_ENTRY,
47 EXEC_ASYNC_SYSCALL_RETURN,
48 EXEC_ASYNC_EXEC,
034dad6f
BR
49 /* This is here only to represent the number of enums. */
50 EXEC_ASYNC_LAST
51};
52
53const char *async_reason_lookup (enum async_reply_reason reason);
54
d6f9b0fb
PA
55/* An MI interpreter. */
56
57class mi_interp final : public interp
66bb093b 58{
d6f9b0fb
PA
59public:
60 mi_interp (const char *name)
61 : interp (name)
62 {}
63
64 void init (bool top_level) override;
65 void resume () override;
66 void suspend () override;
67 gdb_exception exec (const char *command_str) override;
68 ui_out *interp_ui_out () override;
ca1285d1
AH
69 void set_logging (ui_file_up logfile, bool logging_redirect,
70 bool debug_redirect) override;
d6f9b0fb
PA
71 void pre_command_loop () override;
72
66bb093b 73 /* MI's output channels */
d7e74731
PA
74 mi_console_file *out;
75 mi_console_file *err;
76 mi_console_file *log;
77 mi_console_file *targ;
78 mi_console_file *event_channel;
66bb093b 79
9204d692
PA
80 /* Raw console output. */
81 struct ui_file *raw_stdout;
82
ca1285d1
AH
83 /* Raw logfile output. */
84 struct ui_file *raw_stdlog;
85
86 /* Save the original value of raw_stdout and raw_stdlog here when logging, and
87 the file which we need to delete, so we can restore correctly when
88 done. */
9204d692 89 struct ui_file *saved_raw_stdout;
ca1285d1
AH
90 struct ui_file *saved_raw_stdlog;
91 struct ui_file *saved_raw_file_to_delete;
92
9204d692 93
4801a9a3 94 /* MI's builder. */
fd664c91
PA
95 struct ui_out *mi_uiout;
96
97 /* MI's CLI builder (wraps OUT). */
98 struct ui_out *cli_uiout;
66bb093b
VP
99};
100
1a5c2598 101#endif /* MI_MI_COMMON_H */
This page took 1.441316 seconds and 4 git commands to generate.