GDB (xrefs)

tui.h
Go to the documentation of this file.
1 /* External/Public TUI Header File.
2
3 Copyright (C) 1998-2018 Free Software Foundation, Inc.
4
5 Contributed by Hewlett-Packard Company.
6
7 This file is part of GDB.
8
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.
13
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.
18
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/>. */
21
22 #ifndef TUI_H
23 #define TUI_H
24
25 struct ui_file;
26
27 extern void strcat_to_buf (char *, int, const char *);
28
29 /* Types of error returns. */
30 enum tui_status
31 {
32 TUI_SUCCESS,
33 TUI_FAILURE
34 };
35
36 /* Types of windows. */
37 enum tui_win_type
38 {
39 SRC_WIN = 0,
40 DISASSEM_WIN,
41 DATA_WIN,
42 CMD_WIN,
43 /* This must ALWAYS be AFTER the major windows last. */
44 MAX_MAJOR_WINDOWS,
45 /* Auxillary windows. */
46 LOCATOR_WIN,
47 EXEC_INFO_WIN,
48 DATA_ITEM_WIN,
49 /* This must ALWAYS be next to last. */
50 MAX_WINDOWS,
51 UNDEFINED_WIN /* LAST */
52 };
53
54 /* GENERAL TUI FUNCTIONS */
55 /* tui.c */
56 extern CORE_ADDR tui_get_low_disassembly_address (struct gdbarch *,
57 CORE_ADDR, CORE_ADDR);
58 extern void tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr);
59 extern int tui_is_window_visible (enum tui_win_type type);
60 extern int tui_get_command_dimension (unsigned int *width,
61 unsigned int *height);
62
63 /* Initialize readline and configure the keymap for the switching
64 key shortcut. */
65 extern void tui_initialize_readline (void);
66
67 /* Enter in the tui mode (curses). */
68 extern void tui_enable (void);
69
70 /* Leave the tui mode. */
71 extern void tui_disable (void);
72
73 enum tui_key_mode
74 {
75 /* Plain command mode to enter gdb commands. */
76 TUI_COMMAND_MODE,
77
78 /* SingleKey mode with some keys bound to gdb commands. */
79 TUI_SINGLE_KEY_MODE,
80
81 /* Read/edit one command and return to SingleKey after it's
82 processed. */
83 TUI_ONE_COMMAND_MODE
84 };
85
86 extern enum tui_key_mode tui_current_key_mode;
87
88 /* Change the TUI key mode by installing the appropriate readline
89 keymap. */
90 extern void tui_set_key_mode (enum tui_key_mode mode);
91
92 extern int tui_active;
93
94 extern void tui_show_source (const char *fullname, int line);
95
96 /* tui-layout.c */
97 extern enum tui_status tui_set_layout_by_name (const char *);
98
99 #endif
gdbarch
Definition: gdbarch.c:127
TUI_SUCCESS
Definition: tui.h:32
tui_set_key_mode
void tui_set_key_mode(enum tui_key_mode mode)
Definition: tui.c:318
CORE_ADDR
bfd_vma CORE_ADDR
Definition: common-types.h:41
tui_show_source
void tui_show_source(const char *fullname, int line)
Definition: tui.c:630
tui_key_mode
tui_key_mode
Definition: tui.h:73
tui_get_low_disassembly_address
CORE_ADDR tui_get_low_disassembly_address(struct gdbarch *, CORE_ADDR, CORE_ADDR)
Definition: tui-disasm.c:359
tui_get_command_dimension
int tui_get_command_dimension(unsigned int *width, unsigned int *height)
Definition: tui.c:661
tui_is_window_visible
int tui_is_window_visible(enum tui_win_type type)
Definition: tui.c:649
tui_disable
void tui_disable(void)
Definition: tui.c:518
tui_enable
void tui_enable(void)
Definition: tui.c:401
ui_file
Definition: ui-file.h:26
TUI_COMMAND_MODE
Definition: tui.h:76
tui_set_layout_by_name
enum tui_status tui_set_layout_by_name(const char *)
Definition: tui-layout.c:400
TUI_FAILURE
Definition: tui.h:33
tui_current_key_mode
enum tui_key_mode tui_current_key_mode
Definition: tui.c:63
EXEC_INFO_WIN
Definition: tui.h:47
LOCATOR_WIN
Definition: tui.h:46
SRC_WIN
Definition: tui.h:39
tui_active
int tui_active
Definition: tui.c:60
type
Definition: gdbtypes.h:749
UNDEFINED_WIN
Definition: tui.h:51
tui_status
tui_status
Definition: tui.h:30
strcat_to_buf
void strcat_to_buf(char *, int, const char *)
Definition: tui.c:562
CMD_WIN
Definition: tui.h:42
MAX_WINDOWS
Definition: tui.h:50
tui_initialize_readline
void tui_initialize_readline(void)
Definition: tui.c:329
tui_win_type
tui_win_type
Definition: tui.h:37
DATA_ITEM_WIN
Definition: tui.h:48
MAX_MAJOR_WINDOWS
Definition: tui.h:44
DISASSEM_WIN
Definition: tui.h:40
tui_show_assembly
void tui_show_assembly(struct gdbarch *gdbarch, CORE_ADDR addr)
Definition: tui.c:642
DATA_WIN
Definition: tui.h:41
TUI_ONE_COMMAND_MODE
Definition: tui.h:83
TUI_SINGLE_KEY_MODE
Definition: tui.h:79