gdb/event-top.h - gdb

Macros defined

Source code

  1. /* Definitions used by event-top.c, for GDB, the GNU debugger.

  2.    Copyright (C) 1999-2015 Free Software Foundation, Inc.

  3.    Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.

  4.    This file is part of GDB.

  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 3 of the License, or
  8.    (at your option) any later version.

  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.

  13.    You should have received a copy of the GNU General Public License
  14.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  15. #ifndef EVENT_TOP_H
  16. #define EVENT_TOP_H

  17. struct cmd_list_element;

  18. /* Exported functions from event-top.c.
  19.    FIXME: these should really go into top.h.  */

  20. extern void display_gdb_prompt (const char *new_prompt);
  21. void gdb_setup_readline (void);
  22. void gdb_disable_readline (void);
  23. extern void async_init_signals (void);
  24. extern void set_async_editing_command (char *args, int from_tty,
  25.                                        struct cmd_list_element *c);

  26. /* Signal to catch ^Z typed while reading a command: SIGTSTP or SIGCONT.  */
  27. #ifndef STOP_SIGNAL
  28. #include <signal.h>
  29. #ifdef SIGTSTP
  30. #define STOP_SIGNAL SIGTSTP
  31. extern void handle_stop_sig (int sig);
  32. #endif
  33. #endif
  34. extern void handle_sigint (int sig);
  35. extern void handle_sigterm (int sig);
  36. extern void gdb_readline2 (void *client_data);
  37. extern void async_request_quit (void *arg);
  38. extern void stdin_event_handler (int error, void *client_data);
  39. extern void async_disable_stdin (void);
  40. extern void async_enable_stdin (void);

  41. /* Exported variables from event-top.c.
  42.    FIXME: these should really go into top.h.  */

  43. extern int async_command_editing_p;
  44. extern int exec_done_display_p;
  45. extern char *async_annotation_suffix;
  46. extern struct prompts the_prompts;
  47. extern void (*call_readline) (void *);
  48. extern void (*input_handler) (char *);
  49. extern int input_fd;
  50. extern void (*after_char_processing_hook) (void);
  51. extern int call_stdin_event_handler_again_p;

  52. /* Wrappers for rl_callback_handler_remove and
  53.    rl_callback_handler_install that keep track of whether the callback
  54.    handler is installed in readline.  Do not call the readline
  55.    versions directly.  */
  56. extern void gdb_rl_callback_handler_remove (void);
  57. extern void gdb_rl_callback_handler_install (const char *prompt);

  58. /* Reinstall the readline callback handler (with no prompt), if not
  59.    currently installed.  */
  60. extern void gdb_rl_callback_handler_reinstall (void);

  61. extern void cli_command_loop (void *);

  62. #endif