From 362c05fe98907eeba515c04386aee99936914114 Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Tue, 1 Nov 2005 17:40:25 +0000 Subject: 2005-11-01 Andrew Stubbs * 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. --- gdb/tui/tui-stack.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gdb/tui/tui-stack.c') diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index c0a1b82..bba77fd 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -364,14 +364,15 @@ tui_show_frame_info (struct frame_info *fi) if (win_info == TUI_SRC_WIN) { - union tui_line_or_address l; - l.line_no = start_line; + struct tui_line_or_address l; + l.loa = LOA_LINE; + l.u.line_no = start_line; if (!(source_already_displayed && tui_line_is_displayed (item->locator.line_no, win_info, TRUE))) tui_update_source_window (win_info, sal.symtab, l, TRUE); else { - l.line_no = item->locator.line_no; + l.u.line_no = item->locator.line_no; tui_set_is_exec_point_at (l, win_info); } } @@ -379,13 +380,14 @@ tui_show_frame_info (struct frame_info *fi) { if (win_info == TUI_DISASM_WIN) { - union tui_line_or_address a; - a.addr = low; + struct tui_line_or_address a; + a.loa = LOA_ADDRESS; + a.u.addr = low; if (!tui_addr_is_displayed (item->locator.addr, win_info, TRUE)) tui_update_source_window (win_info, sal.symtab, a, TRUE); else { - a.addr = item->locator.addr; + a.u.addr = item->locator.addr; tui_set_is_exec_point_at (a, win_info); } } -- cgit v1.1