aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-win.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2004-03-13 14:14:01 +0000
committerStephane Carrez <stcarrez@nerim.fr>2004-03-13 14:14:01 +0000
commit10f5941595647a2acb0d36d1ddd3753a2fd797f6 (patch)
treebc3a939b264ab455ef5a7fbf5f0a6e6a5eb0f635 /gdb/tui/tui-win.c
parent27d1e716489223fb9e36e6f4762db2b6b60aeb5c (diff)
downloadgdb-10f5941595647a2acb0d36d1ddd3753a2fd797f6.zip
gdb-10f5941595647a2acb0d36d1ddd3753a2fd797f6.tar.gz
gdb-10f5941595647a2acb0d36d1ddd3753a2fd797f6.tar.bz2
* tui/tui-win.h (tui_get_cmd_list): Declare.
* tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
Diffstat (limited to 'gdb/tui/tui-win.c')
-rw-r--r--gdb/tui/tui-win.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 846e0b4..1c67baa 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -290,6 +290,26 @@ show_tui_cmd (char *args, int from_tty)
{
}
+static struct cmd_list_element *tuilist;
+
+static void
+tui_command (char *args, int from_tty)
+{
+ printf_unfiltered ("\"tui\" must be followed by the name of a "
+ "tui command.\n");
+ help_list (tuilist, "tui ", -1, gdb_stdout);
+}
+
+struct cmd_list_element **
+tui_get_cmd_list ()
+{
+ if (tuilist == 0)
+ add_prefix_cmd ("tui", class_tui, tui_command,
+ "Text User Interface commands.",
+ &tuilist, "tui ", 0, &cmdlist);
+ return &tuilist;
+}
+
/* Function to initialize gdb commands, for tui window manipulation. */
void
_initialize_tui_win (void)
@@ -300,10 +320,6 @@ _initialize_tui_win (void)
/* Define the classes of commands.
They will appear in the help list in the reverse of this order. */
- add_cmd ("tui", class_tui, NULL,
- "Text User Interface commands.",
- &cmdlist);
-
add_prefix_cmd ("tui", class_tui, set_tui_cmd,
"TUI configuration variables",
&tui_setlist, "set tui ",
@@ -602,6 +618,9 @@ tui_resize_all (void)
enum tui_win_type win_type;
int new_height, split_diff, cmd_split_diff, num_wins_displayed = 2;
+#ifdef HAVE_RESIZE_TERM
+ resize_term (screenheight, screenwidth);
+#endif
/* turn keypad off while we resize */
if (win_with_focus != TUI_CMD_WIN)
keypad (TUI_CMD_WIN->generic.handle, FALSE);
@@ -680,10 +699,6 @@ tui_resize_all (void)
new_height = first_win->generic.height + split_diff;
make_invisible_and_set_new_height (first_win, new_height);
- if (first_win == TUI_DATA_WIN && width_diff != 0)
- first_win->detail.data_display_info.regs_column_count =
- tui_calculate_regs_column_count (
- first_win->detail.data_display_info.regs_display_type);
locator->width += width_diff;
/* Change the second window's height/width */