Remove most cleanups from linux-thread-db.c
authorTom Tromey <tom@tromey.com>
Wed, 21 Feb 2018 23:39:18 +0000 (16:39 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 24 Feb 2018 17:02:42 +0000 (10:02 -0700)
commit9b292f68805700c7ae46fc149231fdb79554bd17
treea05646980c0e7f294a33ecfdc76c7a2b0cbba339
parent281d762b1a56317171e462666b98d50bfa31a08a
Remove most cleanups from linux-thread-db.c

This removes most (but not all) cleanups from linux-thread-db.c.
std::string and std::vector are used in place of manual memory
management.

The remaining cleanup in linux-thread-db.c uses
make_cleanup_free_char_ptr_vec, which requires a somewhat bigger
change.

Regression tested by the buildbot.

ChangeLog
2018-02-24  Tom Tromey  <tom@tromey.com>

* linux-thread-db.c (try_thread_db_load_from_pdir_1)
(try_thread_db_load_from_dir, thread_db_load_search): Use
std::string.
(info_auto_load_libthread_db_compare): Return bool.  Change
argument types.
(info_auto_load_libthread_db): Use std::vector, std::string.
Remove cleanups.
gdb/ChangeLog
gdb/linux-thread-db.c