mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 18:44:20 +08:00
* 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.
This commit is contained in:
parent
27d1e71648
commit
10f5941595
@ -1,3 +1,47 @@
|
||||
2004-03-13 Stephane Carrez <stcarrez@nerim.fr>
|
||||
|
||||
* 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.
|
||||
|
||||
2004-03-13 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* NEWS (New native configurations): Mention OpenBSD/amd64.
|
||||
|
@ -507,6 +507,7 @@ init_content_element (struct tui_win_element * element, enum tui_win_type type)
|
||||
element->which_element.data.item_no = UNDEFINED_ITEM;
|
||||
element->which_element.data.value = NULL;
|
||||
element->which_element.data.highlight = FALSE;
|
||||
element->which_element.data.content = (char*) NULL;
|
||||
break;
|
||||
case LOCATOR_WIN:
|
||||
element->which_element.locator.file_name[0] =
|
||||
@ -548,6 +549,7 @@ init_win_info (struct tui_win_info * win_info)
|
||||
TUI_UNDEFINED_REGS;
|
||||
win_info->detail.data_display_info.regs_column_count = 1;
|
||||
win_info->detail.data_display_info.display_regs = FALSE;
|
||||
win_info->detail.data_display_info.current_group = 0;
|
||||
break;
|
||||
case CMD_WIN:
|
||||
win_info->detail.command_info.cur_line = 0;
|
||||
@ -904,6 +906,7 @@ free_content_elements (tui_win_content content, int content_size, enum tui_win_t
|
||||
if (element->which_element.data.type != TUI_REGISTER)
|
||||
xfree ((void *)element->which_element.data.name);
|
||||
xfree (element->which_element.data.value);
|
||||
xfree (element->which_element.data.content);
|
||||
xfree (element);
|
||||
break;
|
||||
case CMD_WIN:
|
||||
|
@ -180,6 +180,7 @@ struct tui_data_element
|
||||
enum tui_data_type type;
|
||||
void *value;
|
||||
int highlight;
|
||||
char *content;
|
||||
};
|
||||
|
||||
|
||||
@ -248,6 +249,7 @@ struct tui_data_info
|
||||
enum tui_register_display_type regs_display_type;
|
||||
int regs_column_count;
|
||||
int display_regs; /* Should regs be displayed at all? */
|
||||
struct reggroup *current_group;
|
||||
};
|
||||
|
||||
|
||||
|
@ -248,10 +248,7 @@ tui_set_layout (enum tui_layout_type layout_type,
|
||||
}
|
||||
if (regs_populate)
|
||||
{
|
||||
layout_def->regs_display_type =
|
||||
(regs_display_type == TUI_UNDEFINED_REGS ?
|
||||
TUI_GENERAL_REGS : regs_display_type);
|
||||
tui_show_registers (layout_def->regs_display_type);
|
||||
tui_show_registers (TUI_DATA_WIN->detail.data_display_info.current_group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,14 +28,12 @@
|
||||
#include "tui/tui-data.h" /* For struct tui_register_display_type. */
|
||||
|
||||
extern void tui_check_register_values (struct frame_info *);
|
||||
extern void tui_show_registers (enum tui_register_display_type);
|
||||
extern void tui_show_registers (struct reggroup *group);
|
||||
extern void tui_display_registers_from (int);
|
||||
extern int tui_display_registers_from_line (int, int);
|
||||
extern int tui_last_regs_line_no (void);
|
||||
extern int tui_first_reg_element_inline (int);
|
||||
extern int tui_line_from_reg_element_no (int);
|
||||
extern void tui_toggle_float_regs (void);
|
||||
extern int tui_calculate_regs_column_count (enum tui_register_display_type);
|
||||
extern int tui_first_reg_element_no_inline (int lineno);
|
||||
|
||||
#endif
|
||||
|
@ -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 */
|
||||
|
@ -53,4 +53,7 @@ extern int tui_update_variables (void);
|
||||
/* Update gdb's knowledge of the terminal size. */
|
||||
extern void tui_update_gdb_sizes (void);
|
||||
|
||||
/* Create or get the TUI command list. */
|
||||
struct cmd_list_element **tui_get_cmd_list ();
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user