]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/objfiles.c
Change gdb_abspath to return a unique_xmalloc_ptr
authorTom Tromey <tom@tromey.com>
Thu, 3 Aug 2017 22:32:14 +0000 (16:32 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 22 Aug 2017 15:30:10 +0000 (09:30 -0600)
commite3e41d588adbe26a6ca54338dd4915382d981a3e
tree82e4563027b5e460a017465c39ec252257fb591d
parent0d999a6ef0f98b22430d70951408869864c979e0
Change gdb_abspath to return a unique_xmalloc_ptr

This changes gdb_abspath to return a unique_xmalloc_ptr, and fixes up
the callers.  This allows the removal of a cleanup, and also puts
ownership rules into the API, where they belong.

ChangeLog
2017-08-22  Tom Tromey  <tom@tromey.com>

* compile/compile.c (compile_file_command): Use
gdb::unique_xmalloc_ptr, std::string.
* utils.c (gdb_abspath): Change return type.
* source.c (openp): Update.
* objfiles.c (allocate_objfile): Update.
* main.c (set_gdb_data_directory): Update.
* utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
gdb/ChangeLog
gdb/compile/compile.c
gdb/main.c
gdb/objfiles.c
gdb/source.c
gdb/utils.c
gdb/utils.h