Use gdb_bfd_sections in restore_command
authorTom Tromey <tom@tromey.com>
Sat, 19 Sep 2020 17:54:49 +0000 (11:54 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 19 Sep 2020 17:54:53 +0000 (11:54 -0600)
commit03cd72b8107b34e7b572f9962ee589472ff1fa1e
tree6b4fcbde7c4de10c6958e0eebc12747cbb02741f
parentf4f2b85fb2eab29ea981b2c3f2058c1dc04e413c
Use gdb_bfd_sections in restore_command

This changes restore_command to avoid bfd_map_over_sections, in favor
of iteration.  A helper data structure can also be removed by this
patch.

gdb/ChangeLog
2020-09-19  Tom Tromey  <tom@tromey.com>

* cli/cli-dump.c (struct callback_data): Remove.
(restore_one_section): Rename from restore_section_callback.
Change parameters.
(restore_binary_file): Change parameters.
(restore_command): Use foreach.
gdb/ChangeLog
gdb/cli/cli-dump.c