diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-22 00:20:39 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-25 07:48:47 -0600 |
commit | 41bcff7feefea958e7be1656e087cae4d54a2af9 (patch) | |
tree | 1640f384acaab9dac2133711ae4cf6f8c4b9f8a1 /gdb/tui/tui-data.h | |
parent | d2802c33429eb73303dc610401f5d7d27e071ff2 (diff) | |
download | gdb-41bcff7feefea958e7be1656e087cae4d54a2af9.zip gdb-41bcff7feefea958e7be1656e087cae4d54a2af9.tar.gz gdb-41bcff7feefea958e7be1656e087cae4d54a2af9.tar.bz2 |
Separate out data item window
This introduces a new subclass of tui_gen_win_info for the data item
windows, letting us remove another element from tui_which_element.
gdb/ChangeLog
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_show_registers, tui_show_register_group)
(tui_display_registers_from, tui_check_register_values): Update.
(tui_display_register): Remove win_info parameter; update.
(tui_get_register): Change type of parameters.
* tui/tui-data.h (struct tui_data_element): Remove.
(union tui_which_element) <data>: Remove.
<data_window>: Change type.
(struct tui_data_item_window): New.
* tui/tui-data.c (init_content_element): Remove DATA_ITEM_WIN
case. Add assert.
(~tui_data_item_window): New destructor.
(free_content_elements): Remove DATA_ITEM_WIN case.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r-- | gdb/tui/tui-data.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 5c1f2bd..6567874 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -188,19 +188,6 @@ struct tui_source_element }; -/* Elements in the data display window content. */ -struct tui_data_element -{ - const char *name; - int item_no; /* The register number, or data display - number. */ - enum tui_data_type type; - void *value; - int highlight; - char *content; -}; - - #ifdef PATH_MAX # define MAX_LOCATOR_ELEMENT_LEN PATH_MAX #else @@ -226,8 +213,7 @@ typedef char tui_exec_info_content[TUI_EXECINFO_SIZE]; union tui_which_element { struct tui_source_element source; /* The source elements. */ - struct tui_gen_win_info *data_window; /* Data display elements. */ - struct tui_data_element data; /* Elements of data_window. */ + struct tui_data_item_window *data_window; /* Data display elements. */ }; struct tui_win_element @@ -282,6 +268,26 @@ struct tui_locator_window : public tui_gen_win_info struct gdbarch *gdbarch = nullptr; }; +/* A data item window. */ + +struct tui_data_item_window : public tui_gen_win_info +{ + tui_data_item_window () + : tui_gen_win_info (DATA_ITEM_WIN) + { + } + + ~tui_data_item_window () override; + + const char *name = nullptr; + /* The register number, or data display number. */ + int item_no = UNDEFINED_ITEM; + enum tui_data_type data_type = TUI_REGISTER; + void *value = nullptr; + bool highlight = false; + char *content = nullptr; +}; + /* This defines information about each logical window. */ struct tui_win_info : public tui_gen_win_info { |