mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
Change tui_set_layout to return void
tui_set_layout can't meaningfully be called with UNDEFINED_LAYOUT; and instead of trying to handle this case, simply assert and have the function return void. No caller was checking the return value anyway. gdb/ChangeLog 2019-07-17 Tom Tromey <tom@tromey.com> * tui/tui-layout.h (tui/tui-layout): Return void. * tui/tui-layout.c (tui_set_layout): Return void. Add assert.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2019-07-17 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* tui/tui-layout.h (tui/tui-layout): Return void.
|
||||
* tui/tui-layout.c (tui_set_layout): Return void. Add assert.
|
||||
|
||||
2019-07-17 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* tui/tui-layout.c (show_source_disasm_command, show_data):
|
||||
|
@ -113,13 +113,11 @@ show_layout (enum tui_layout_type layout)
|
||||
|
||||
/* Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
|
||||
SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND. */
|
||||
enum tui_status
|
||||
void
|
||||
tui_set_layout (enum tui_layout_type layout_type)
|
||||
{
|
||||
enum tui_status status = TUI_SUCCESS;
|
||||
gdb_assert (layout_type != UNDEFINED_LAYOUT);
|
||||
|
||||
if (layout_type != UNDEFINED_LAYOUT)
|
||||
{
|
||||
enum tui_layout_type cur_layout = tui_current_layout ();
|
||||
struct gdbarch *gdbarch;
|
||||
CORE_ADDR addr;
|
||||
@ -207,11 +205,6 @@ tui_set_layout (enum tui_layout_type layout_type)
|
||||
tui_show_registers (TUI_DATA_WIN->current_group);
|
||||
}
|
||||
}
|
||||
else
|
||||
status = TUI_FAILURE;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Add the specified window to the layout in a logical way. This
|
||||
means setting up the most logical layout given the window to be
|
||||
|
@ -30,6 +30,6 @@ extern int tui_default_win_height (enum tui_win_type,
|
||||
enum tui_layout_type);
|
||||
extern int tui_default_win_viewport_height (enum tui_win_type,
|
||||
enum tui_layout_type);
|
||||
extern enum tui_status tui_set_layout (enum tui_layout_type);
|
||||
extern void tui_set_layout (enum tui_layout_type);
|
||||
|
||||
#endif /* TUI_TUI_LAYOUT_H */
|
||||
|
Reference in New Issue
Block a user