aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-10-12 15:53:16 -0600
committerTom Tromey <tom@tromey.com>2020-10-12 20:18:47 -0600
commit2d128614d4101354d8125449539dc3255c37d345 (patch)
tree4d07bd7567401171c8ea9edd5cee5170b0a0f3b9 /gdb/solib.c
parentbb2a67773c5e06545c39a6373be720c7d3d9eeb5 (diff)
downloadgdb-2d128614d4101354d8125449539dc3255c37d345.zip
gdb-2d128614d4101354d8125449539dc3255c37d345.tar.gz
gdb-2d128614d4101354d8125449539dc3255c37d345.tar.bz2
build_section_table cannot fail
I noticed that build_section_table cannot fail. This patch changes it to return a target_section_table and then removes the dead code. gdb/ChangeLog 2020-10-12 Tom Tromey <tom@tromey.com> * solib.c (solib_map_sections): Update. * record-full.c (record_full_core_open_1): Update. * exec.h (build_section_table): Return a target_section_table. * exec.c (exec_file_attach): Update. (build_section_table): Return a target_section_table. * corelow.c (core_target::core_target): Update. * bfd-target.c (target_bfd::target_bfd): Update.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index 906e178..bd6a27d 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -554,11 +554,7 @@ solib_map_sections (struct so_list *so)
if (so->sections == nullptr)
so->sections = new target_section_table;
- if (build_section_table (so->abfd, so->sections))
- {
- error (_("Can't find the file sections in `%s': %s"),
- bfd_get_filename (so->abfd), bfd_errmsg (bfd_get_error ()));
- }
+ *so->sections = build_section_table (so->abfd);
for (target_section &p : so->sections->sections)
{