mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
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.
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user