]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/mi/mi-common.h
Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
[thirdparty/binutils-gdb.git] / gdb / mi / mi-common.h
1 /* Interface for common GDB/MI data
2 Copyright (C) 2005-2017 Free Software Foundation, Inc.
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
8 the Free Software Foundation; either version 3 of the License, or
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
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19 #ifndef MI_COMMON_H
20 #define MI_COMMON_H
21
22 struct mi_console_file;
23
24 /* Represents the reason why GDB is sending an asynchronous command to
25 the front end. NOTE: When modifing this, don't forget to update
26 gdb.texinfo! */
27 enum async_reply_reason
28 {
29 EXEC_ASYNC_BREAKPOINT_HIT = 0,
30 EXEC_ASYNC_WATCHPOINT_TRIGGER,
31 EXEC_ASYNC_READ_WATCHPOINT_TRIGGER,
32 EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER,
33 EXEC_ASYNC_FUNCTION_FINISHED,
34 EXEC_ASYNC_LOCATION_REACHED,
35 EXEC_ASYNC_WATCHPOINT_SCOPE,
36 EXEC_ASYNC_END_STEPPING_RANGE,
37 EXEC_ASYNC_EXITED_SIGNALLED,
38 EXEC_ASYNC_EXITED,
39 EXEC_ASYNC_EXITED_NORMALLY,
40 EXEC_ASYNC_SIGNAL_RECEIVED,
41 EXEC_ASYNC_SOLIB_EVENT,
42 EXEC_ASYNC_FORK,
43 EXEC_ASYNC_VFORK,
44 EXEC_ASYNC_SYSCALL_ENTRY,
45 EXEC_ASYNC_SYSCALL_RETURN,
46 EXEC_ASYNC_EXEC,
47 /* This is here only to represent the number of enums. */
48 EXEC_ASYNC_LAST
49 };
50
51 const char *async_reason_lookup (enum async_reply_reason reason);
52
53 struct mi_interp
54 {
55 /* MI's output channels */
56 mi_console_file *out;
57 mi_console_file *err;
58 mi_console_file *log;
59 mi_console_file *targ;
60 mi_console_file *event_channel;
61
62 /* Raw console output. */
63 struct ui_file *raw_stdout;
64
65 /* Save the original value of raw_stdout here when logging, so we
66 can restore correctly when done. */
67 struct ui_file *saved_raw_stdout;
68
69 /* MI's builder. */
70 struct ui_out *mi_uiout;
71
72 /* MI's CLI builder (wraps OUT). */
73 struct ui_out *cli_uiout;
74
75 /* This is the interpreter for the mi... */
76 struct interp *mi2_interp;
77 struct interp *mi1_interp;
78 struct interp *mi_interp;
79 };
80
81 #endif