aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.h
diff options
context:
space:
mode:
authorAndrew Stubbs <andrew.stubbs@st.com>2005-11-01 17:40:25 +0000
committerAndrew Stubbs <andrew.stubbs@st.com>2005-11-01 17:40:25 +0000
commit362c05fe98907eeba515c04386aee99936914114 (patch)
treefdf7e5641627956309e33c7bab0f0c71da230c3d /gdb/tui/tui-data.h
parent3929abe911f69151c090ce5f3912324b852d273c (diff)
downloadgdb-362c05fe98907eeba515c04386aee99936914114.zip
gdb-362c05fe98907eeba515c04386aee99936914114.tar.gz
gdb-362c05fe98907eeba515c04386aee99936914114.tar.bz2
2005-11-01 Andrew Stubbs <andrew.stubbs@st.com>
* tui/tui-data.h (tui_line_or_address): Encapsulate the union in a struct with a tag. (tui_source_element, tui_source_info): Update. * tui/tui-disasm.c, tui/tui-source.c: Update to use the tagged union. * tui/tui-source.h, tui/tui-stack.c, tui/tui-win.c: Likewise. * tui/tui-winsource.c, tui/tui-data.c, tui/tui-layout.c: Likewise. * tui/tui-winsource.h: Likewise.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r--gdb/tui/tui-data.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 02bebb4..4a6c413 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -147,10 +147,14 @@ enum tui_register_display_type
};
/* Structure describing source line or line address */
-union tui_line_or_address
+struct tui_line_or_address
{
- int line_no;
- CORE_ADDR addr;
+ enum { LOA_LINE, LOA_ADDRESS } loa;
+ union
+ {
+ int line_no;
+ CORE_ADDR addr;
+ } u;
};
/* Current Layout definition */
@@ -166,7 +170,7 @@ struct tui_layout_def
struct tui_source_element
{
char *line;
- union tui_line_or_address line_or_addr;
+ struct tui_line_or_address line_or_addr;
int is_exec_point;
int has_break;
};
@@ -259,7 +263,7 @@ struct tui_source_info
/* Execution information window. */
struct tui_gen_win_info *execution_info;
int horizontal_offset; /* used for horizontal scroll */
- union tui_line_or_address start_line_or_addr;
+ struct tui_line_or_address start_line_or_addr;
char* filename;
};