mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
gdb/tui: Define tui window names once.
Don't duplicate the window names inside the completion function. Instead make use of the existing defines, and the tui_win_name function to obtain the window names. gdb/ChangeLog: * tui/tui-win.c (focus_completer): Don't duplicate the tui window names in this function.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2015-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
|
* tui/tui-win.c (focus_completer): Don't duplicate the tui window
|
||||||
|
names in this function.
|
||||||
|
|
||||||
2015-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
|
2015-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
* tui/tui-data.h (SRC_NAME): Convert to lower case.
|
* tui/tui-data.h (SRC_NAME): Convert to lower case.
|
||||||
|
@ -374,25 +374,8 @@ focus_completer (struct cmd_list_element *ignore,
|
|||||||
|| !tui_win_list[win_type]->generic.is_visible)
|
|| !tui_win_list[win_type]->generic.is_visible)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (win_type)
|
completion_name = tui_win_name (&tui_win_list [win_type]->generic);
|
||||||
{
|
gdb_assert (completion_name != NULL);
|
||||||
case SRC_WIN:
|
|
||||||
completion_name = "src";
|
|
||||||
break;
|
|
||||||
case DISASSEM_WIN:
|
|
||||||
completion_name = "asm";
|
|
||||||
break;
|
|
||||||
case DATA_WIN:
|
|
||||||
completion_name = "regs";
|
|
||||||
break;
|
|
||||||
case CMD_WIN:
|
|
||||||
completion_name = "cmd";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (completion_name != NULL)
|
|
||||||
VEC_safe_push (const_char_ptr, completion_name_vec, completion_name);
|
VEC_safe_push (const_char_ptr, completion_name_vec, completion_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,8 +385,8 @@ focus_completer (struct cmd_list_element *ignore,
|
|||||||
default layout to SRC_COMMAND. */
|
default layout to SRC_COMMAND. */
|
||||||
if (VEC_length (const_char_ptr, completion_name_vec) == 0)
|
if (VEC_length (const_char_ptr, completion_name_vec) == 0)
|
||||||
{
|
{
|
||||||
VEC_safe_push (const_char_ptr, completion_name_vec, "src");
|
VEC_safe_push (const_char_ptr, completion_name_vec, SRC_NAME);
|
||||||
VEC_safe_push (const_char_ptr, completion_name_vec, "cmd");
|
VEC_safe_push (const_char_ptr, completion_name_vec, CMD_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_safe_push (const_char_ptr, completion_name_vec, "next");
|
VEC_safe_push (const_char_ptr, completion_name_vec, "next");
|
||||||
|
Reference in New Issue
Block a user