15796c8dcSSimon Schubert /* Top level stuff for GDB, the GNU debugger. 25796c8dcSSimon Schubert 3*ef5ccd6cSJohn Marino Copyright (C) 1986-2013 Free Software Foundation, Inc. 45796c8dcSSimon Schubert 55796c8dcSSimon Schubert This file is part of GDB. 65796c8dcSSimon Schubert 75796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify 85796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by 95796c8dcSSimon Schubert the Free Software Foundation; either version 3 of the License, or 105796c8dcSSimon Schubert (at your option) any later version. 115796c8dcSSimon Schubert 125796c8dcSSimon Schubert This program is distributed in the hope that it will be useful, 135796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of 145796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 155796c8dcSSimon Schubert GNU General Public License for more details. 165796c8dcSSimon Schubert 175796c8dcSSimon Schubert You should have received a copy of the GNU General Public License 185796c8dcSSimon Schubert along with this program. If not, see <http://www.gnu.org/licenses/>. */ 195796c8dcSSimon Schubert 205796c8dcSSimon Schubert #ifndef TOP_H 215796c8dcSSimon Schubert #define TOP_H 225796c8dcSSimon Schubert 235796c8dcSSimon Schubert /* From top.c. */ 24a45ae5f8SJohn Marino extern char *saved_command_line; 25a45ae5f8SJohn Marino extern int saved_command_line_size; 265796c8dcSSimon Schubert extern FILE *instream; 275796c8dcSSimon Schubert extern int in_user_command; 28*ef5ccd6cSJohn Marino extern int confirm; 295796c8dcSSimon Schubert extern char gdb_dirbuf[1024]; 305796c8dcSSimon Schubert extern int inhibit_gdbinit; 315796c8dcSSimon Schubert extern char gdbinit[]; 325796c8dcSSimon Schubert 335796c8dcSSimon Schubert extern void print_gdb_version (struct ui_file *); 345796c8dcSSimon Schubert 355796c8dcSSimon Schubert extern void read_command_file (FILE *); 365796c8dcSSimon Schubert extern void init_history (void); 375796c8dcSSimon Schubert extern void command_loop (void); 385796c8dcSSimon Schubert extern int quit_confirm (void); 395796c8dcSSimon Schubert extern void quit_force (char *, int); 405796c8dcSSimon Schubert extern void quit_command (char *, int); 41a45ae5f8SJohn Marino extern void quit_cover (void); 425796c8dcSSimon Schubert extern void execute_command (char *, int); 435796c8dcSSimon Schubert 44*ef5ccd6cSJohn Marino extern void check_frame_language_change (void); 45*ef5ccd6cSJohn Marino 465796c8dcSSimon Schubert /* Prepare for execution of a command. 47a45ae5f8SJohn Marino Call this before every command, CLI or MI. 48a45ae5f8SJohn Marino Returns a cleanup to be run after the command is completed. */ 49a45ae5f8SJohn Marino extern struct cleanup *prepare_execute_command (void); 505796c8dcSSimon Schubert 515796c8dcSSimon Schubert /* This function returns a pointer to the string that is used 525796c8dcSSimon Schubert by gdb for its command prompt. */ 535796c8dcSSimon Schubert extern char *get_prompt (void); 545796c8dcSSimon Schubert 55a45ae5f8SJohn Marino /* This function returns a pointer to the string that is used 56a45ae5f8SJohn Marino by gdb for its command prompt. */ 57a45ae5f8SJohn Marino extern void set_prompt (const char *s); 585796c8dcSSimon Schubert 595796c8dcSSimon Schubert /* From random places. */ 605796c8dcSSimon Schubert extern int readnow_symbol_files; 615796c8dcSSimon Schubert 62c50c785cSJohn Marino /* Perform _initialize initialization. */ 635796c8dcSSimon Schubert extern void gdb_init (char *); 645796c8dcSSimon Schubert 65c50c785cSJohn Marino /* For use by event-top.c. */ 665796c8dcSSimon Schubert /* Variables from top.c. */ 675796c8dcSSimon Schubert extern int source_line_number; 68cf7f2e2dSJohn Marino extern const char *source_file_name; 695796c8dcSSimon Schubert extern int history_expansion_p; 705796c8dcSSimon Schubert extern int server_command; 715796c8dcSSimon Schubert extern char *lim_at_start; 725796c8dcSSimon Schubert 735796c8dcSSimon Schubert extern void show_commands (char *args, int from_tty); 745796c8dcSSimon Schubert 755796c8dcSSimon Schubert extern void set_history (char *, int); 765796c8dcSSimon Schubert 775796c8dcSSimon Schubert extern void show_history (char *, int); 785796c8dcSSimon Schubert 795796c8dcSSimon Schubert extern void set_verbose (char *, int, struct cmd_list_element *); 805796c8dcSSimon Schubert 815796c8dcSSimon Schubert extern void do_restore_instream_cleanup (void *stream); 825796c8dcSSimon Schubert 835796c8dcSSimon Schubert #endif 84