GDB (xrefs)
Loading...
Searching...
No Matches
tui.h
Go to the documentation of this file.
1/* External/Public TUI Header File.
2
3 Copyright (C) 1998-2023 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_TUI_H
23#define TUI_TUI_H
24
25/* Flag to control tui debugging. */
26
27extern bool debug_tui;
28
29/* Print a "tui" debug statement. */
30
31#define tui_debug_printf(fmt, ...) \
32 debug_prefixed_printf_cond (debug_tui, "tui", fmt, ##__VA_ARGS__)
33
34/* Print "tui" enter/exit debug statements. */
35
36#define TUI_SCOPED_DEBUG_ENTER_EXIT \
37 scoped_debug_enter_exit (debug_tui, "tui")
38
39#define TUI_SCOPED_DEBUG_START_END(fmt, ...) \
40 scoped_debug_start_end (debug_tui, "tui", fmt, ##__VA_ARGS__)
41
42struct ui_file;
43
44/* Types of error returns. */
50
51/* Types of windows. */
53{
59 /* This must ALWAYS be AFTER the major windows last. */
61};
62
63extern CORE_ADDR tui_get_low_disassembly_address (struct gdbarch *,
64 CORE_ADDR, CORE_ADDR);
65extern void tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr);
66extern bool tui_is_window_visible (enum tui_win_type type);
67extern bool tui_get_command_dimension (unsigned int *width,
68 unsigned int *height);
69
70/* Initialize readline and configure the keymap for the switching key
71 shortcut. May be called more than once without issue. */
73
74/* Enter in the tui mode (curses). */
75extern void tui_enable (void);
76
77/* Leave the tui mode. */
78extern void tui_disable (void);
79
81{
82 /* Plain command mode to enter gdb commands. */
84
85 /* SingleKey mode with some keys bound to gdb commands. */
87
88 /* Read/edit one command and return to SingleKey after it's
89 processed. */
91};
92
94
95/* Change the TUI key mode by installing the appropriate readline
96 keymap. */
97extern void tui_set_key_mode (enum tui_key_mode mode);
98
99extern bool tui_active;
100
101#endif /* TUI_TUI_H */
bool tui_get_command_dimension(unsigned int *width, unsigned int *height)
Definition tui.c:593
void tui_disable(void)
Definition tui.c:523
void tui_ensure_readline_initialized()
Definition tui.c:294
tui_status
Definition tui.h:46
@ TUI_SUCCESS
Definition tui.h:47
@ TUI_FAILURE
Definition tui.h:48
void tui_show_assembly(struct gdbarch *gdbarch, CORE_ADDR addr)
Definition tui.c:573
tui_win_type
Definition tui.h:53
@ DISASSEM_WIN
Definition tui.h:55
@ CMD_WIN
Definition tui.h:57
@ STATUS_WIN
Definition tui.h:58
@ DATA_WIN
Definition tui.h:56
@ SRC_WIN
Definition tui.h:54
@ MAX_MAJOR_WINDOWS
Definition tui.h:60
bool debug_tui
Definition tui.c:56
enum tui_key_mode tui_current_key_mode
Definition tui.c:76
bool tui_is_window_visible(enum tui_win_type type)
Definition tui.c:581
CORE_ADDR tui_get_low_disassembly_address(struct gdbarch *, CORE_ADDR, CORE_ADDR)
Definition tui-disasm.c:430
void tui_enable(void)
Definition tui.c:381
bool tui_active
Definition tui.c:73
void tui_set_key_mode(enum tui_key_mode mode)
Definition tui.c:283
tui_key_mode
Definition tui.h:81
@ TUI_ONE_COMMAND_MODE
Definition tui.h:90
@ TUI_SINGLE_KEY_MODE
Definition tui.h:86
@ TUI_COMMAND_MODE
Definition tui.h:83