Simplify add_target_sections_of_objfile
authorTom Tromey <tom@tromey.com>
Mon, 12 Oct 2020 21:53:16 +0000 (15:53 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 13 Oct 2020 02:18:47 +0000 (20:18 -0600)
commit91840ee38a1114bc02120935bf73dd5acda3b062
tree0acea37944e6c869c22e8eca007bbb256f4f032b
parent2d128614d4101354d8125449539dc3255c37d345
Simplify add_target_sections_of_objfile

Now that target_section_table uses std::vector,
add_target_sections_of_objfile does not need to loop twice.  This
patch simplifies this code to have just a single loop.  Also, the
passed-in objfile can never be NULL, so this changes this function to
assert that.

gdb/ChangeLog
2020-10-12  Tom Tromey  <tom@tromey.com>

* exec.c (add_target_sections_of_objfile): Simplify.
gdb/ChangeLog
gdb/exec.c