diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-04-13 17:31:02 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-18 15:48:03 -0400 |
commit | 7ab2607f97e5deaeae91018edf3ef5b4255a842c (patch) | |
tree | f1fea75412b59b147691af35019eb6d940f062b0 /gdb/dwarf2/index-cache.c | |
parent | e0c34637019b0a070780b57b50d9026c0aca16f4 (diff) | |
download | gdb-7ab2607f97e5deaeae91018edf3ef5b4255a842c.zip gdb-7ab2607f97e5deaeae91018edf3ef5b4255a842c.tar.gz gdb-7ab2607f97e5deaeae91018edf3ef5b4255a842c.tar.bz2 |
gdbsupport: make gdb_abspath return an std::string
I'm trying to switch these functions to use std::string instead of char
arrays, as much as possible. Some callers benefit from it (can avoid
doing a copy of the result), while others suffer (have to make one more
copy).
Change-Id: Iced49b8ee2f189744c5072a3b217aab5af17a993
Diffstat (limited to 'gdb/dwarf2/index-cache.c')
-rw-r--r-- | gdb/dwarf2/index-cache.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c index 18e60cb..fb827e0 100644 --- a/gdb/dwarf2/index-cache.c +++ b/gdb/dwarf2/index-cache.c @@ -298,9 +298,7 @@ set_index_cache_directory_command (const char *arg, int from_tty, cmd_list_element *element) { /* Make sure the index cache directory is absolute and tilde-expanded. */ - gdb::unique_xmalloc_ptr<char> abs - = gdb_abspath (index_cache_directory.c_str ()); - index_cache_directory = abs.get (); + index_cache_directory = gdb_abspath (index_cache_directory.c_str ()); global_index_cache.set_directory (index_cache_directory); } |