diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2002-08-31 12:02:14 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2002-08-31 12:02:14 +0000 |
commit | e09d2eba9e1ebda1f5a50fe14e34941c22e09173 (patch) | |
tree | 13671ea7da53fcc70a55eaed71c59580e74e03c7 /gdb/tui/tui.h | |
parent | f5ad01299e7a0ae637936bc03108df1e59b3ce42 (diff) | |
download | gdb-e09d2eba9e1ebda1f5a50fe14e34941c22e09173.zip gdb-e09d2eba9e1ebda1f5a50fe14e34941c22e09173.tar.gz gdb-e09d2eba9e1ebda1f5a50fe14e34941c22e09173.tar.bz2 |
2002-08-31 Stephane Carrez <stcarrez@nerim.fr>
* tui.c (tui_commands): Table of single key commands.
(tui_rl_command_key): New function to execute gdb command.
(tui_rl_command_mode): New function to temporarily leave SingleKey.
(tui_rl_next_keymap): New function to enter/leave the SingleKey mode.
(tui_rl_startup_hook): New function to avoid prompt display by
readline functions.
(tui_set_key_mode): New function to set the key mode and install
the readline keymap.
(tui_initialize_readline): Create TUI SingleKey readline map.
(tui_enable): Install rl_startup_hook.
(tui_disable): Remove it.
* tui.h (enum tui_key_mode): Declare.
(tui_set_key_mode, tui_current_key_mode): Declare.
* tuiIO.c (tui_redisplay_readline): Don't display the prompt in
SingleKey mode.
* tuiIO.h (tui_redisplay_readline): Declare.
Diffstat (limited to 'gdb/tui/tui.h')
-rw-r--r-- | gdb/tui/tui.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h index 9cc538d..e6cb4b8 100644 --- a/gdb/tui/tui.h +++ b/gdb/tui/tui.h @@ -102,6 +102,23 @@ extern void tui_enable (void); /* Leave the tui mode. */ extern void tui_disable (void); +enum tui_key_mode +{ + /* Plain command mode to enter gdb commands. */ + tui_command_mode, + + /* SingleKey mode with some keys bound to gdb commands. */ + tui_single_key_mode, + + /* Read/edit one command and return to SingleKey after it's processed. */ + tui_one_command_mode +}; + +extern enum tui_key_mode tui_current_key_mode; + +/* Change the TUI key mode by installing the appropriate readline keymap. */ +extern void tui_set_key_mode (enum tui_key_mode mode); + extern void tui_initialize_io (void); extern void tui_initialize_readline (void); |