GDB (xrefs)

Classes | Functions | Variables
tui.c File Reference
`#include "defs.h"`
`#include "gdbcmd.h"`
`#include "tui/tui.h"`
`#include "tui/tui-hooks.h"`
`#include "tui/tui-data.h"`
`#include "tui/tui-layout.h"`
`#include "tui/tui-io.h"`
`#include "tui/tui-regs.h"`
`#include "tui/tui-stack.h"`
`#include "tui/tui-win.h"`
`#include "tui/tui-winsource.h"`
`#include "tui/tui-windata.h"`
`#include "target.h"`
`#include "frame.h"`
`#include "breakpoint.h"`
`#include "inferior.h"`
`#include "symtab.h"`
`#include "source.h"`
`#include "terminal.h"`
`#include "top.h"`
`#include <ctype.h>`
`#include <signal.h>`
`#include <fcntl.h>`
`#include <setjmp.h>`
`#include "gdb_curses.h"`
`#include "interps.h"`
`#include "readline/readline.h"`

Go to the source code of this file.

## Classes
struct | tui_char_command

## Functions
static int | tui_rl_switch_mode (int notused1, int notused2)
static int | tui_rl_change_windows (int notused1, int notused2)
static int | tui_rl_delete_other_windows (int notused1, int notused2)
static int | tui_rl_other_window (int count, int key)
static int | tui_rl_command_key (int count, int key)
static int | tui_rl_command_mode (int count, int key)
static int | tui_rl_next_keymap (int notused1, int notused2)
static int | tui_rl_startup_hook (void)
void | tui_set_key_mode (enum tui_key_mode mode)
void | tui_initialize_readline (void)
static const char * | gdb_getenv_term (void)
void | tui_enable (void)
void | tui_disable (void)
static void | tui_enable_command (const char *args, int from_tty)
static void | tui_disable_command (const char *args, int from_tty)
void | strcat_to_buf (char *buf, int buflen, const char *item_to_add)
void | tui_show_source (const char *fullname, int line)
void | tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr)
int | tui_is_window_visible (enum tui_win_type type)
int | tui_get_command_dimension (unsigned int *width, unsigned int *height)
void | _initialize_tui (void)

## Variables
int | tui_active = 0
static int | tui_finish_init = 1
enum tui_key_mode | tui_current_key_mode = TUI_COMMAND_MODE
static const struct tui_char_command | tui_commands []
static Keymap | tui_keymap
static Keymap | tui_readline_standard_keymap

## Function Documentation

## ◆ _initialize_tui()

void _initialize_tui | ( | void |  | ) |

Definition at line 675 of file tui.c.

References _, add_cmd(), class_tui, tui_disable_command(), tui_enable_command(), and tui_get_cmd_list().

## ◆ gdb_getenv_term()

static const char* gdb_getenv_term | ( | void |  | ) |
| static

Definition at line 386 of file tui.c.

Referenced by tui_enable().

## ◆ strcat_to_buf()

void strcat_to_buf | ( | char * | buf,
|  | int | buflen,
|  | const char * | item_to_add
| ) |  |

Definition at line 562 of file tui.c.

Referenced by tui_make_status_line(), tui_set_locator_fullname(), and tui_set_locator_info().

## ◆ tui_disable()

void tui_disable | ( | void |  | ) |

Definition at line 518 of file tui.c.

References gdb_save_tty_state(), tui_active, tui_readline_standard_keymap, tui_remove_hooks(), tui_setup_io(), and tui_update_gdb_sizes().

Referenced by tui_interp::suspend(), tui_disable_command(), tui_exit(), tui_rl_switch_mode(), and undo_terminal_modifications_before_exit().

## ◆ tui_disable_command()

static void tui_disable_command | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 556 of file tui.c.

References tui_disable().

Referenced by _initialize_tui().

## ◆ tui_enable()

void tui_enable | ( | void |  | ) |

Definition at line 401 of file tui.c.

References _, deprecated_safe_get_selected_frame(), error(), gdb_getenv_term(), gdb_save_tty_state(), gdb_stdout, interp_name(), INTERP_TUI, SRC_COMMAND, top_level_interpreter(), tui_active, TUI_CMD_WIN, tui_current_key_mode, tui_finish_init, tui_install_hooks(), tui_refresh_all_win(), tui_resize_all(), tui_rl_startup_hook(), tui_set_key_mode(), tui_set_layout(), tui_set_term_height_to(), tui_set_term_width_to(), tui_set_win_focus_to(), tui_set_win_resized_to(), tui_setup_io(), tui_show_frame_info(), TUI_SRC_WIN, tui_update_gdb_sizes(), tui_update_variables(), tui_win_resized(), and ui_file_isatty().

Referenced by tui_interp::resume(), tui_enable_command(), tui_refresh_all_command(), tui_reg_command(), tui_rl_switch_mode(), tui_scroll_backward_command(), tui_scroll_forward_command(), tui_scroll_left_command(), tui_scroll_right_command(), tui_set_focus_command(), tui_set_layout_by_name(), tui_set_tab_width_command(), tui_set_win_height(), tui_set_win_height_command(), and tui_show_registers().

## ◆ tui_enable_command()

static void tui_enable_command | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 548 of file tui.c.

References tui_enable().

Referenced by _initialize_tui().

## ◆ tui_get_command_dimension()

int tui_get_command_dimension | ( | unsigned int * | width,
|  | unsigned int * | height
| ) |  |

Definition at line 661 of file tui.c.

References tui_active, and TUI_CMD_WIN.

Referenced by init_page_info().

## ◆ tui_initialize_readline()

void tui_initialize_readline | ( | void |  | ) |

Definition at line 329 of file tui.c.

References tui_char_command::cmd, tui_commands, tui_keymap, tui_readline_standard_keymap, tui_rl_change_windows(), tui_rl_command_key(), tui_rl_command_mode(), tui_rl_delete_other_windows(), tui_rl_next_keymap(), tui_rl_other_window(), and tui_rl_switch_mode().

Referenced by tui_interp::init().

## ◆ tui_is_window_visible()

int tui_is_window_visible | ( | enum tui_win_type | type | ) |

Definition at line 649 of file tui.c.

References tui_win_info::generic, tui_gen_win_info::is_visible, tui_active, tui_win_list, and type.

Referenced by print_disassembly(), and tui_refresh_frame_and_register_information().

## ◆ tui_rl_change_windows()

static int tui_rl_change_windows | ( | int | notused1,
|  | int | notused2
| ) |  |
| static

Definition at line 148 of file tui.c.

References DISASSEM_COMMAND, DISASSEM_DATA_COMMAND, SRC_COMMAND, SRC_DATA_COMMAND, SRC_DISASSEM_COMMAND, tui_active, tui_current_layout(), tui_rl_switch_mode(), and tui_set_layout().

Referenced by tui_initialize_readline().

## ◆ tui_rl_command_key()

static int tui_rl_command_key | ( | int | count,
|  | int | key
| ) |  |
| static

Definition at line 250 of file tui.c.

References tui_char_command::cmd, reinitialize_more_filter(), tui_commands, TUI_ONE_COMMAND_MODE, and tui_set_key_mode().

Referenced by tui_initialize_readline().

## ◆ tui_rl_command_mode()

static int tui_rl_command_mode | ( | int | count,
|  | int | key
| ) |  |
| static

Definition at line 281 of file tui.c.

References TUI_ONE_COMMAND_MODE, and tui_set_key_mode().

Referenced by tui_initialize_readline().

## ◆ tui_rl_delete_other_windows()

static int tui_rl_delete_other_windows | ( | int | notused1,
|  | int | notused2
| ) |  |
| static

Definition at line 195 of file tui.c.

References DISASSEM_COMMAND, DISASSEM_DATA_COMMAND, SRC_COMMAND, SRC_DATA_COMMAND, SRC_DISASSEM_COMMAND, tui_active, tui_current_layout(), tui_rl_switch_mode(), and tui_set_layout().

Referenced by tui_initialize_readline().

## ◆ tui_rl_next_keymap()

static int tui_rl_next_keymap | ( | int | notused1,
|  | int | notused2
| ) |  |
| static

Definition at line 290 of file tui.c.

References tui_active, TUI_COMMAND_MODE, tui_current_key_mode, tui_rl_switch_mode(), tui_set_key_mode(), and TUI_SINGLE_KEY_MODE.

Referenced by tui_initialize_readline().

## ◆ tui_rl_other_window()

static int tui_rl_other_window | ( | int | count,
|  | int | key
| ) |  |
| static

Definition at line 229 of file tui.c.

References tui_active, TUI_CMD_WIN, TUI_DATA_WIN, tui_next_win(), tui_refresh_data_win(), tui_rl_switch_mode(), tui_set_win_focus_to(), and tui_win_with_focus().

Referenced by tui_initialize_readline().

## ◆ tui_rl_startup_hook()

static int tui_rl_startup_hook | ( | void |  | ) |
| static

Definition at line 305 of file tui.c.

References current_ui, gdb_in_secondary_prompt_p(), TUI_COMMAND_MODE, tui_current_key_mode, tui_redisplay_readline(), tui_set_key_mode(), and TUI_SINGLE_KEY_MODE.

Referenced by tui_enable().

## ◆ tui_rl_switch_mode()

static int tui_rl_switch_mode | ( | int | notused1,
|  | int | notused2
| ) |  |
| static

Definition at line 94 of file tui.c.

References CATCH, dont_repeat(), END_CATCH, exception_print(), gdb_stderr, RETURN_MASK_ALL, TRY, tui_active, tui_disable(), and tui_enable().

Referenced by tui_initialize_readline(), tui_rl_change_windows(), tui_rl_delete_other_windows(), tui_rl_next_keymap(), and tui_rl_other_window().

## ◆ tui_set_key_mode()

void tui_set_key_mode | ( | enum tui_key_mode | mode | ) |

Definition at line 318 of file tui.c.

References tui_current_key_mode, tui_keymap, tui_readline_standard_keymap, tui_show_locator_content(), and TUI_SINGLE_KEY_MODE.

Referenced by tui_enable(), tui_inferior_exit(), tui_redisplay_readline(), tui_rl_command_key(), tui_rl_command_mode(), tui_rl_next_keymap(), and tui_rl_startup_hook().

## ◆ tui_show_assembly()

void tui_show_assembly | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | addr
| ) |  |

Definition at line 642 of file tui.c.

References DISASSEM_WIN, tui_add_win_to_layout(), and tui_update_source_windows_with_addr().

Referenced by print_disassembly().

## ◆ tui_show_source()

void tui_show_source | ( | const char * | fullname,
|  | int | line
| ) |  |

Definition at line 630 of file tui.c.

References get_current_source_symtab_and_line(), symtab_and_line::line, SRC_WIN, symtab_and_line::symtab, tui_add_win_to_layout(), tui_update_locator_fullname(), and tui_update_source_windows_with_line().

Referenced by tui_ui_out::do_field_string().

## Variable Documentation

## ◆ tui_active

int tui_active = 0

Definition at line 60 of file tui.c.

Referenced by disassemble_command(), disassemble_current_function(), tui_interp::interp_ui_out(), tui_interp::suspend(), tui_disable(), tui_enable(), tui_get_command_dimension(), tui_is_window_visible(), tui_new_objfile_hook(), tui_readline_output(), tui_rl_change_windows(), tui_rl_delete_other_windows(), tui_rl_next_keymap(), tui_rl_other_window(), tui_rl_switch_mode(), tui_set_var_cmd(), and tui_update_gdb_sizes().

## ◆ tui_commands

const struct tui_char_command tui_commands[]
| static

Initial value:
= {
{ 'c', "continue" },
{ 'd', "down" },
{ 'f', "finish" },
{ 'n', "next" },
{ 'o', "nexti" },
{ 'r', "run" },
{ 's', "step" },
{ 'i', "stepi" },
{ 'u', "up" },
{ 'v', "info locals" },
{ 'w', "where" },
{ 0, 0 },
}

Definition at line 73 of file tui.c.

Referenced by tui_initialize_readline(), and tui_rl_command_key().

## ◆ tui_current_key_mode

enum tui_key_mode tui_current_key_mode = TUI_COMMAND_MODE

Definition at line 63 of file tui.c.

Referenced by tui_enable(), tui_make_status_line(), tui_redisplay_readline(), tui_rl_next_keymap(), tui_rl_startup_hook(), and tui_set_key_mode().

## ◆ tui_finish_init

int tui_finish_init = 1
| static

Definition at line 61 of file tui.c.

Referenced by tui_enable().

## ◆ tui_keymap

Keymap tui_keymap
| static

Definition at line 88 of file tui.c.

Referenced by tui_initialize_readline(), and tui_set_key_mode().

## ◆ tui_readline_standard_keymap

Keymap tui_readline_standard_keymap
| static

Definition at line 89 of file tui.c.

Referenced by tui_disable(), tui_initialize_readline(), and tui_set_key_mode().