diff options
author | Andrew Stubbs <andrew.stubbs@st.com> | 2005-11-01 17:40:25 +0000 |
---|---|---|
committer | Andrew Stubbs <andrew.stubbs@st.com> | 2005-11-01 17:40:25 +0000 |
commit | 362c05fe98907eeba515c04386aee99936914114 (patch) | |
tree | fdf7e5641627956309e33c7bab0f0c71da230c3d /gdb/tui/tui-win.c | |
parent | 3929abe911f69151c090ce5f3912324b852d273c (diff) | |
download | gdb-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-win.c')
-rw-r--r-- | gdb/tui/tui-win.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index cdd2550..739c53c 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -1322,31 +1322,30 @@ make_visible_with_new_height (struct tui_win_info * win_info) tui_make_visible (win_info->detail.source_info.execution_info); if (win_info->generic.content != NULL) { - union tui_line_or_address line_or_addr; + struct tui_line_or_address line_or_addr; struct symtab_and_line cursal = get_current_source_symtab_and_line (); - if (win_info->generic.type == SRC_WIN) - line_or_addr.line_no = - win_info->detail.source_info.start_line_or_addr.line_no; - else - line_or_addr.addr = - win_info->detail.source_info.start_line_or_addr.addr; + line_or_addr = win_info->detail.source_info.start_line_or_addr; tui_free_win_content (&win_info->generic); tui_update_source_window (win_info, cursal.symtab, line_or_addr, TRUE); } else if (deprecated_selected_frame != (struct frame_info *) NULL) { - union tui_line_or_address line; + struct tui_line_or_address line; struct symtab_and_line cursal = get_current_source_symtab_and_line (); s = find_pc_symtab (get_frame_pc (deprecated_selected_frame)); if (win_info->generic.type == SRC_WIN) - line.line_no = cursal.line; + { + line.loa = LOA_LINE; + line.u.line_no = cursal.line; + } else { - find_line_pc (s, cursal.line, &line.addr); + line.loa = LOA_ADDRESS; + find_line_pc (s, cursal.line, &line.u.addr); } tui_update_source_window (win_info, s, line, TRUE); } |