aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.h
diff options
context:
space:
mode:
authorPatrick Palka <patrick@parcs.ath.cx>2015-04-24 08:26:50 -0400
committerPatrick Palka <patrick@parcs.ath.cx>2015-04-27 21:19:53 -0400
commit63ed81829ea8819bc96b288f95230876b0060b14 (patch)
tree13e7bb1443d4efb3511a469efd9b0bcafdd1d4f5 /gdb/tui/tui-data.h
parentd84f2dd3257a3062637059e4f8a85ee22d94865b (diff)
downloadbinutils-63ed81829ea8819bc96b288f95230876b0060b14.zip
binutils-63ed81829ea8819bc96b288f95230876b0060b14.tar.gz
binutils-63ed81829ea8819bc96b288f95230876b0060b14.tar.bz2
Make type-safe the 'content' field of struct tui_gen_win_info
The 'content' field of struct tui_gen_win_info currently has type void ** but the field always stores an object of type tui_win_content. Instead of unnecessarily casting to and from void ** we should just give the field the type tui_win_content in the first place. This patch does this and also eliminates all now-redundant casts involving the 'content' struct field that I could find. gdb/ChangeLog: * tui/tui-data.h (struct tui_win_element): Forward-declare. (tui_win_content): Move declaration. (struct tui_gen_win_info): Give 'content' field the type tui_win_content. * tui/tui-data.c (init_content_element): Remove redundant and erroneous casts. (tui_add_content_elements): Remove erroneous cast. * tui/tui-disasm.c (tui_set_disassem_content): Remove redundant casts. (tui_get_begin_asm_address): Likewise. * tui/tui-regs.c (tui_show_registers): Likewise. (tui_show_register_group): Likewise. (tui_display_registers_from): Likewise. (tui_check_register_values): Likewise. * tui/tui-source.c (tui_set_source_content): Likewise. (tui_set_source_content_nil): Likewise. (tui_source_is_displayed): Likewise. * tui/tui-stack.c (tui_show_locator_content): Likewise. (tui_set_locator_fullname): Likewise. (tui_set_locator_info): Likewise. (tui_show_frame_info): Likewise. * tui/tui-winsource.c (tui_clear_source_content): Likewise. (tui_show_source_line): Likewise. (tui_horizontal_source_scroll): Likewise. (tui_update_breakpoint_info): Likewise. (tui_set_exec_info_content): Likewise. (tui_show_exec_info_content): Likewise. (tui_alloc_source_buffer): Likewise. (tui_line_is_displayed): Likewise. (tui_addr_is_displayed): Likewise.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r--gdb/tui/tui-data.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index f87c45d..7651efd 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -31,6 +31,11 @@ struct tui_point
int x, y;
};
+struct tui_win_element;
+
+/* This describes the content of the window. */
+typedef struct tui_win_element **tui_win_content;
+
/* Generic window information. */
struct tui_gen_win_info
{
@@ -39,7 +44,7 @@ struct tui_gen_win_info
int width; /* Window width. */
int height; /* Window height. */
struct tui_point origin; /* Origin of window. */
- void **content; /* Content of window. */
+ tui_win_content content; /* Content of window. */
int content_size; /* Size of content (# of elements). */
int content_in_use; /* Can it be used, or is it already used? */
int viewport_height; /* Viewport height. */
@@ -250,11 +255,6 @@ struct tui_win_element
union tui_which_element which_element;
};
-
-/* This describes the content of the window. */
-typedef struct tui_win_element **tui_win_content;
-
-
/* This struct defines the specific information about a data display
window. */
struct tui_data_info