GDB (API)
|
00001 /* External/Public TUI Header File. 00002 00003 Copyright (C) 1998-2013 Free Software Foundation, Inc. 00004 00005 Contributed by Hewlett-Packard Company. 00006 00007 This file is part of GDB. 00008 00009 This program is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00021 00022 #ifndef TUI_H 00023 #define TUI_H 00024 00025 struct ui_file; 00026 00027 extern void strcat_to_buf (char *, int, const char *); 00028 00029 /* Types of error returns. */ 00030 enum tui_status 00031 { 00032 TUI_SUCCESS, 00033 TUI_FAILURE 00034 }; 00035 00036 /* Types of windows. */ 00037 enum tui_win_type 00038 { 00039 SRC_WIN = 0, 00040 DISASSEM_WIN, 00041 DATA_WIN, 00042 CMD_WIN, 00043 /* This must ALWAYS be AFTER the major windows last. */ 00044 MAX_MAJOR_WINDOWS, 00045 /* Auxillary windows. */ 00046 LOCATOR_WIN, 00047 EXEC_INFO_WIN, 00048 DATA_ITEM_WIN, 00049 /* This must ALWAYS be next to last. */ 00050 MAX_WINDOWS, 00051 UNDEFINED_WIN /* LAST */ 00052 }; 00053 00054 /* GENERAL TUI FUNCTIONS */ 00055 /* tui.c */ 00056 extern CORE_ADDR tui_get_low_disassembly_address (struct gdbarch *, 00057 CORE_ADDR, CORE_ADDR); 00058 extern void tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr); 00059 extern int tui_is_window_visible (enum tui_win_type type); 00060 extern int tui_get_command_dimension (unsigned int *width, 00061 unsigned int *height); 00062 00063 /* Initialize readline and configure the keymap for the switching 00064 key shortcut. */ 00065 extern void tui_initialize_readline (void); 00066 00067 /* True if enabling the TUI is allowed. Example, if the top level 00068 interpreter is MI, enabling curses will certainly lose. */ 00069 extern int tui_allowed_p (void); 00070 00071 /* Enter in the tui mode (curses). */ 00072 extern void tui_enable (void); 00073 00074 /* Leave the tui mode. */ 00075 extern void tui_disable (void); 00076 00077 enum tui_key_mode 00078 { 00079 /* Plain command mode to enter gdb commands. */ 00080 TUI_COMMAND_MODE, 00081 00082 /* SingleKey mode with some keys bound to gdb commands. */ 00083 TUI_SINGLE_KEY_MODE, 00084 00085 /* Read/edit one command and return to SingleKey after it's 00086 processed. */ 00087 TUI_ONE_COMMAND_MODE 00088 }; 00089 00090 extern enum tui_key_mode tui_current_key_mode; 00091 00092 /* Change the TUI key mode by installing the appropriate readline 00093 keymap. */ 00094 extern void tui_set_key_mode (enum tui_key_mode mode); 00095 00096 extern int tui_active; 00097 00098 extern void tui_show_source (const char *fullname, int line); 00099 00100 extern struct ui_out *tui_out_new (struct ui_file *stream); 00101 00102 /* tui-layout.c */ 00103 extern enum tui_status tui_set_layout_for_display_command (const char *); 00104 00105 #endif