diff options
author | Tom Tromey <tromey@adacore.com> | 2022-04-19 11:32:04 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-04-21 12:18:25 -0600 |
commit | 31de881f8f9a03499002d28ff42286b79c24a97d (patch) | |
tree | 5b53fb49b9872daf60c36d0fe78f6c9ad0553fe5 /gdb/xcoffread.c | |
parent | 5f21c7aae2040f3463d1ff56a4b0bcdbba34832d (diff) | |
download | binutils-31de881f8f9a03499002d28ff42286b79c24a97d.zip binutils-31de881f8f9a03499002d28ff42286b79c24a97d.tar.gz binutils-31de881f8f9a03499002d28ff42286b79c24a97d.tar.bz2 |
Always use dwarf2_initialize_objfile
Internally we noticed that some tests would fail like so on Windows:
warning: Section .debug_aranges in [...] has duplicate debug_info_offset 0x0, ignoring .debug_aranges.
Debugging showed that, in fact, a second CU was being created at this
offset. We tracked this down to the fact that, while the ELF reader
is careful to re-use the per-BFD data, other readers are not, and
could re-read the DWARF data multiple times.
However, since the change to allow an objfile to have multiple "quick
symbol" implementations, there's no reason for this approach -- it's
safe and easy for all symbol readers to reuse the per-BFD data when
reading DWARF.
This patch implements this idea, simplifying dwarf2_build_psymtabs and
making it private, and then switching to dwarf2_initialize_objfile as
the sole way to start the DWARF reader.
Note that, while I think the call to dwarf2_build_frame_info in
machoread.c is also obsolete, I haven't attempted to remove it here.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r-- | gdb/xcoffread.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 566c082..d8735d2 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -2872,9 +2872,7 @@ xcoff_initial_scan (struct objfile *objfile, symfile_add_flags symfile_flags) /* DWARF2 sections. */ if (dwarf2_has_info (objfile, &dwarf2_xcoff_names)) - dwarf2_build_psymtabs (objfile); - - dwarf2_build_frame_info (objfile); + dwarf2_initialize_objfile (objfile); } static void |