diff options
author | Tom Tromey <tom@tromey.com> | 2017-08-03 16:32:14 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-08-22 09:30:10 -0600 |
commit | e3e41d588adbe26a6ca54338dd4915382d981a3e (patch) | |
tree | 82e4563027b5e460a017465c39ec252257fb591d /gdb/utils.h | |
parent | 0d999a6ef0f98b22430d70951408869864c979e0 (diff) | |
download | gdb-e3e41d588adbe26a6ca54338dd4915382d981a3e.zip gdb-e3e41d588adbe26a6ca54338dd4915382d981a3e.tar.gz gdb-e3e41d588adbe26a6ca54338dd4915382d981a3e.tar.bz2 |
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.
Diffstat (limited to 'gdb/utils.h')
-rw-r--r-- | gdb/utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/utils.h b/gdb/utils.h index bb5fadc..a2a959f 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -256,7 +256,7 @@ extern char *gdb_realpath (const char *); extern char *gdb_realpath_keepfile (const char *); -extern char *gdb_abspath (const char *); +extern gdb::unique_xmalloc_ptr<char> gdb_abspath (const char *); extern int gdb_filename_fnmatch (const char *pattern, const char *string, int flags); |