]>
Commit | Line | Data |
---|---|---|
d318976c FN |
1 | /* ***DEPRECATED*** The gdblib files must not be calling/using things in any |
2 | of the possible command languages. If necessary, a hook (that may be | |
3 | present or not) must be used and set to the appropriate routine by any | |
4 | command language that cares about it. If you are having to include this | |
30baf67b | 5 | file you are possibly doing things the old way. This file will dissapear. |
d318976c FN |
6 | [email protected] */ |
7 | ||
c906108c | 8 | /* Header file for GDB-specific command-line stuff. |
4a94e368 | 9 | Copyright (C) 1986-2022 Free Software Foundation, Inc. |
c906108c | 10 | |
c5aa993b JM |
11 | This program is free software; you can redistribute it and/or modify |
12 | it under the terms of the GNU General Public License as published by | |
a9762ec7 | 13 | the Free Software Foundation; either version 3 of the License, or |
c5aa993b | 14 | (at your option) any later version. |
c906108c | 15 | |
c5aa993b JM |
16 | This program is distributed in the hope that it will be useful, |
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | GNU General Public License for more details. | |
c906108c | 20 | |
c5aa993b | 21 | You should have received a copy of the GNU General Public License |
a9762ec7 | 22 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
c906108c SS |
23 | |
24 | #if !defined (GDBCMD_H) | |
25 | #define GDBCMD_H 1 | |
26 | ||
27 | #include "command.h" | |
8b93c638 | 28 | #include "ui-out.h" |
6b66338c | 29 | #include "cli/cli-script.h" |
5cf3b309 | 30 | #include "cli/cli-cmds.h" |
9291a0cd | 31 | |
95a6b0a1 | 32 | extern void execute_command (const char *, int); |
8a522c6c | 33 | |
86fe51fc TV |
34 | /* Run FN. Sends its output to FILE, do not display it to the screen. |
35 | The global BATCH_FLAG will be temporarily set to true. */ | |
36 | ||
37 | extern void execute_fn_to_ui_file (struct ui_file *file, std::function<void(void)> fn); | |
38 | ||
39 | /* Run FN. Capture its output into the returned string, do not display it | |
40 | to the screen. The global BATCH_FLAG will temporarily be set to true. | |
41 | When TERM_OUT is true the output is collected with terminal behaviour | |
42 | (e.g. with styling). When TERM_OUT is false raw output will be collected | |
43 | (e.g. no styling). */ | |
44 | ||
84a6adfd TV |
45 | extern void execute_fn_to_string (std::string &res, |
46 | std::function<void(void)> fn, bool term_out); | |
86fe51fc TV |
47 | |
48 | /* As execute_fn_to_ui_file, but run execute_command for P and FROM_TTY. */ | |
24cf6389 | 49 | |
b8fd0918 PW |
50 | extern void execute_command_to_ui_file (struct ui_file *file, |
51 | const char *p, int from_tty); | |
c906108c | 52 | |
86fe51fc TV |
53 | /* As execute_fn_to_string, but run execute_command for P and FROM_TTY. */ |
54 | ||
84a6adfd TV |
55 | extern void execute_command_to_string (std::string &res, const char *p, |
56 | int from_tty, bool term_out); | |
57 | ||
58 | /* As execute_command_to_string, but ignore resulting string. */ | |
59 | ||
60 | extern void execute_command_to_string (const char *p, | |
61 | int from_tty, bool term_out); | |
86fe51fc | 62 | |
d9fcf2fb JM |
63 | extern void print_command_line (struct command_line *, unsigned int, |
64 | struct ui_file *); | |
a14ed312 KB |
65 | extern void print_command_lines (struct ui_out *, |
66 | struct command_line *, unsigned int); | |
c906108c | 67 | |
92c1d07d PA |
68 | /* Chains containing all defined "set/show style" subcommands. */ |
69 | extern struct cmd_list_element *style_set_list; | |
70 | extern struct cmd_list_element *style_show_list; | |
71 | ||
c5aa993b | 72 | #endif /* !defined (GDBCMD_H) */ |