This reverts commit 07293be448, as it
causes an unintended change of behavior with GDB/MI's =library-loaded
events: The host-name="<path>" part of the event is now showing the
target-side path instead of the host-side path.
This revert affects Darwin and AIX systems, however, where the BFD
is either artificial or icomplete, leading to the outputt of
"info shared" not containing the information we'd like. For instance,
on Darwin, we would see:
(top-gdb) info shared
From To Syms Read Shared Object Library
0x00007fff8d060de4 0x00007fff8d09ce1f Yes (*) i386:x86-64
0x00007fff8af08b10 0x00007fff8b1c6f73 Yes (*) i386:x86-64
To compensate for that, we overwrite the filename of the associated bfd.
gdb/ChangeLog:
Revert the following commit:
* solib.c (solib_map_sections): Remove code overwriting
SO->SO_NAME with the bfd's filename.
Make the following changes required after the revert above:
* solib-aix.c (solib_aix_bfd_open): Set the filename of the
returned bfd to a copy of the synthetic pathname.
* solib-darwin.c (darwin_bfd_open): Set the filename of the
returned bfd to a copy of PATHNAME.
solib_aix_bfd_open has an early "return" that doesn't run cleanups.
This fixes the problem by dropping the null_cleanup and using a later
cleanup as the master cleanup for the function.
* solib-aix.c (solib_aix_bfd_open): Don't use a null cleanup
for 'cleanup'; instead use a later one.
This issue should now be fixed thanks to a change in bfd removing
the SEC_ALLOC flag from all sections that do not get mapped to
memory.
gdb/ChangeLog:
* solib-aix.c (solib_aix_relocate_section_addresses):
Remove FIXME comment.
This is more consistent with what we do with other similar XML lists,
and avoids a potential confusion with the library-list XML list.
gdb/ChangeLog:
* features/library-list-aix.dtd: Replace library-list by
library-list-aix.
* rs6000-nat.c: Replace library-list by library-list-aix
throughout.
* solib-aix.c: Likewise.
More consistent with the name of other similar object names.
gdb/ChangeLog:
* target.h (enum target_object) [TARGET_OBJECT_LIBRARIES_AIX]:
Renames TARGET_OBJECT_AIX_LIBRARIES.
* rs6000-nat.c: Replace TARGET_OBJECT_AIX_LIBRARIES with
TARGET_OBJECT_LIBRARIES_AIX throughout.
* solib-aix.c: Likwise.