diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-03-29 16:14:36 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-07 13:05:22 -0400 |
commit | 3c86fae3d99bf7b5360b810cc5b19522430ce39d (patch) | |
tree | 0e7ee506318e69330af2d7655826f7bf124001e0 /gdb/tui | |
parent | 44281e6c08cae11d4e116d87ea34ad391d58ae91 (diff) | |
download | binutils-gdb-3c86fae3d99bf7b5360b810cc5b19522430ce39d.tar.gz |
gdb: remove symtab::objfile
Same idea as previous patch, but for symtab::objfile. I find
it clearer without this wrapper, as it shows that the objfile is
common to all symtabs of a given compunit. Otherwise, you could think
that each symtab (of a given compunit) can have a specific objfile.
Change-Id: Ifc0dbc7ec31a06eefa2787c921196949d5a6fcc6
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-source.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index 294ea1c7f13..208889d0bf7 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -70,7 +70,7 @@ tui_source_window::set_contents (struct gdbarch *arch, m_fullname = make_unique_xstrdup (symtab_to_fullname (s)); cur_line = 0; - m_gdbarch = s->objfile ()->arch (); + m_gdbarch = s->compunit ()->objfile ()->arch (); m_start_line_or_addr.loa = LOA_LINE; cur_line_no = m_start_line_or_addr.u.line_no = line_no; diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index c8a1c1aa64b..87b8dcff154 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -199,7 +199,7 @@ tui_update_source_windows_with_line (struct symtab_and_line sal) if (sal.symtab != nullptr) { find_line_pc (sal.symtab, sal.line, &sal.pc); - gdbarch = sal.symtab->objfile ()->arch (); + gdbarch = sal.symtab->compunit ()->objfile ()->arch (); } for (struct tui_source_window_base *win_info : tui_source_windows ()) |