diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-20 19:59:06 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-25 07:48:44 -0600 |
commit | 489e9d8b7bb3337a7f4f902a03c176c22faeabc7 (patch) | |
tree | 0ef7391a8ad8df0e8c463889a64c17164f693fcd /gdb/tui/tui-data.c | |
parent | c3fabb7d69b3735bc6042a2992729944c8ced62c (diff) | |
download | gdb-489e9d8b7bb3337a7f4f902a03c176c22faeabc7.zip gdb-489e9d8b7bb3337a7f4f902a03c176c22faeabc7.tar.gz gdb-489e9d8b7bb3337a7f4f902a03c176c22faeabc7.tar.bz2 |
Separate out execution-info window
This pulls the EXEC_INFO_WIN case out into its own subclass of
tui_gen_win_info. This lets us remove an element from
union tui_which_element.
gdb/ChangeLog
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c
(tui_exec_info_window::maybe_allocate_content): New method.
(tui_set_exec_info_content, tui_show_exec_info_content): Update.
* tui/tui-layout.c (init_and_make_win): Add EXEC_INFO_WIN case.
(make_source_or_disasm_window): Add cast.
* tui/tui-data.h (union tui_which_element) <simple_string>:
Remove.
(struct tui_source_info): New.
(struct tui_source_window_base) <execution_info>: Change type.
* tui/tui-data.c (init_content_element): Remove EXEC_INFO_WIN
case, and add assert.
(tui_alloc_content): Add assert.
Diffstat (limited to 'gdb/tui/tui-data.c')
-rw-r--r-- | gdb/tui/tui-data.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index 5eac1dc..119d249 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -364,6 +364,8 @@ static void init_content_element (struct tui_win_element *element, enum tui_win_type type) { + gdb_assert (type != EXEC_INFO_WIN); + switch (type) { case SRC_WIN: @@ -397,10 +399,6 @@ init_content_element (struct tui_win_element *element, element->which_element.locator.line_no = 0; element->which_element.locator.addr = 0; break; - case EXEC_INFO_WIN: - memset(element->which_element.simple_string, ' ', - sizeof(element->which_element.simple_string)); - break; default: break; } @@ -427,6 +425,8 @@ tui_alloc_content (int num_elements, enum tui_win_type type) struct tui_win_element *element_block_ptr; int i; + gdb_assert (type != EXEC_INFO_WIN); + content = XNEWVEC (struct tui_win_element *, num_elements); /* |