This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Return unique_xmalloc_ptr from some solib.c functions
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 14 Feb 2018 10:37:55 -0500
- Subject: [binutils-gdb] Return unique_xmalloc_ptr from some solib.c functions
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 797bc1cb25b9dbdbc663cf711aecb0acc2450276 ***
Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 797bc1cb25b9dbdbc663cf711aecb0acc2450276
Return unique_xmalloc_ptr from some solib.c functions
This changes a couple of solib.c functions -- exec_file_find and
solib_find -- to return a unique_xmalloc_ptr, and then fixes up the
users. This allows the removal of some cleanups.
This also changes solib_bfd_open to not take ownership of its
argument. I think this change is somewhat cleaner.
gdb/ChangeLog
2018-02-14 Tom Tromey <tom@tromey.com>
* solist.h (exec_file_find, solib_find): Return
unique_xmalloc_ptr.
(solib_bfd_fopen): Take a const char *.
* solib.c (solib_find_1): Return unique_xmalloc_ptr.
(exec_file_find, solib_find): Likewise.
(solib_bfd_fopen): Do not take ownership of "pathname".
(solib_bfd_open): Use unique_xmalloc_ptr.
* solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
* solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
* infrun.c (follow_exec): Use unique_xmalloc_ptr.
* exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
- Follow-Ups:
- Failures on RHEL-s390x-m64, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master
- Failures on Ubuntu-AArch32-m32, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Ubuntu-AArch64-m64, branch master