mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 15:18:37 +08:00
Remove reset_locator
reset_locator was introduced just a few patches ago, but it's already time to remove it. It consists of a call to the locator's "reset" method, plus a call to tui_make_window; but the latter is redundant at all the places that call reset_locator. gdb/ChangeLog 2019-07-17 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (show_source_disasm_command, show_data): Update. (reset_locator): Remove. (show_source_or_disasm_and_command): Update.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2019-07-17 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* tui/tui-layout.c (show_source_disasm_command, show_data):
|
||||||
|
Update.
|
||||||
|
(reset_locator): Remove.
|
||||||
|
(show_source_or_disasm_and_command): Update.
|
||||||
|
|
||||||
2019-07-17 Tom Tromey <tom@tromey.com>
|
2019-07-17 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* tui/tui-source.c (tui_source_window_base::reset): Remove
|
* tui/tui-source.c (tui_source_window_base::reset): Remove
|
||||||
|
@ -43,8 +43,6 @@
|
|||||||
** Static Local Decls
|
** Static Local Decls
|
||||||
********************************/
|
********************************/
|
||||||
static void show_layout (enum tui_layout_type);
|
static void show_layout (enum tui_layout_type);
|
||||||
static void reset_locator (tui_gen_win_info *,
|
|
||||||
int, int, int, int);
|
|
||||||
static void show_source_or_disasm_and_command (enum tui_layout_type);
|
static void show_source_or_disasm_and_command (enum tui_layout_type);
|
||||||
static struct tui_win_info *make_command_window (int, int);
|
static struct tui_win_info *make_command_window (int, int);
|
||||||
static struct tui_win_info *make_source_window (int, int);
|
static struct tui_win_info *make_source_window (int, int);
|
||||||
@ -611,8 +609,7 @@ show_source_disasm_command (void)
|
|||||||
{
|
{
|
||||||
tui_win_list[DISASSEM_WIN]
|
tui_win_list[DISASSEM_WIN]
|
||||||
= make_disasm_window (asm_height, src_height - 1);
|
= make_disasm_window (asm_height, src_height - 1);
|
||||||
reset_locator (locator,
|
locator->reset (2 /* 1 */ ,
|
||||||
2 /* 1 */ ,
|
|
||||||
tui_term_width (),
|
tui_term_width (),
|
||||||
0,
|
0,
|
||||||
(src_height + asm_height) - 1);
|
(src_height + asm_height) - 1);
|
||||||
@ -688,8 +685,7 @@ show_data (enum tui_layout_type new_layout)
|
|||||||
else
|
else
|
||||||
tui_win_list[win_type]
|
tui_win_list[win_type]
|
||||||
= make_disasm_window (src_height, data_height - 1);
|
= make_disasm_window (src_height, data_height - 1);
|
||||||
reset_locator (locator,
|
locator->reset (2 /* 1 */ ,
|
||||||
2 /* 1 */ ,
|
|
||||||
tui_term_width (),
|
tui_term_width (),
|
||||||
0,
|
0,
|
||||||
total_height - 1);
|
total_height - 1);
|
||||||
@ -736,16 +732,6 @@ tui_gen_win_info::reset (int height_, int width_,
|
|||||||
origin.y = origin_y_;
|
origin.y = origin_y_;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
reset_locator (tui_gen_win_info *win_info,
|
|
||||||
int height, int width,
|
|
||||||
int origin_x, int origin_y)
|
|
||||||
{
|
|
||||||
win_info->reset (height, width, origin_x, origin_y);
|
|
||||||
tui_make_window (win_info, DONT_BOX_WINDOW);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Show the Source/Command or the Disassem layout. */
|
/* Show the Source/Command or the Disassem layout. */
|
||||||
static void
|
static void
|
||||||
show_source_or_disasm_and_command (enum tui_layout_type layout_type)
|
show_source_or_disasm_and_command (enum tui_layout_type layout_type)
|
||||||
@ -775,8 +761,7 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
|
|||||||
*win_info_ptr = make_source_window (src_height - 1, 0);
|
*win_info_ptr = make_source_window (src_height - 1, 0);
|
||||||
else
|
else
|
||||||
*win_info_ptr = make_disasm_window (src_height - 1, 0);
|
*win_info_ptr = make_disasm_window (src_height - 1, 0);
|
||||||
reset_locator (locator,
|
locator->reset (2 /* 1 */ ,
|
||||||
2 /* 1 */ ,
|
|
||||||
tui_term_width (),
|
tui_term_width (),
|
||||||
0,
|
0,
|
||||||
src_height - 1);
|
src_height - 1);
|
||||||
|
Reference in New Issue
Block a user