1 /* Definitions used by event-top.c, for GDB, the GNU debugger.
3 Copyright (C) 1999-2016 Free Software Foundation, Inc.
5 Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
7 This file is part of GDB.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
25 struct cmd_list_element;
27 /* Exported functions from event-top.c.
28 FIXME: these should really go into top.h. */
30 extern void display_gdb_prompt (const char *new_prompt);
31 extern void gdb_setup_readline (int);
32 extern void gdb_disable_readline (void);
33 extern void async_init_signals (void);
34 extern void change_line_handler (int);
36 extern void command_line_handler (char *rl);
37 extern void command_handler (char *command);
39 /* Signal to catch ^Z typed while reading a command: SIGTSTP or SIGCONT. */
43 #define STOP_SIGNAL SIGTSTP
44 extern void handle_stop_sig (int sig);
47 extern void handle_sigint (int sig);
48 extern void handle_sigterm (int sig);
49 extern void async_request_quit (void *arg);
50 extern void stdin_event_handler (int error, void *client_data);
51 extern void async_disable_stdin (void);
52 extern void async_enable_stdin (void);
54 /* Exported variables from event-top.c.
55 FIXME: these should really go into top.h. */
57 extern int set_editing_cmd_var;
58 extern int exec_done_display_p;
59 extern struct prompts the_prompts;
60 extern void (*after_char_processing_hook) (void);
61 extern int call_stdin_event_handler_again_p;
62 extern void gdb_readline_no_editing_callback (void *client_data);
64 /* Wrappers for rl_callback_handler_remove and
65 rl_callback_handler_install that keep track of whether the callback
66 handler is installed in readline. Do not call the readline
68 extern void gdb_rl_callback_handler_remove (void);
69 extern void gdb_rl_callback_handler_install (const char *prompt);
71 /* Reinstall the readline callback handler (with no prompt), if not
72 currently installed. */
73 extern void gdb_rl_callback_handler_reinstall (void);
75 extern void cli_command_loop (void *);