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
This commit is contained in:
parent
e0c3463701
commit
7ab2607f97
11 changed files with 52 additions and 63 deletions
|
@ -469,7 +469,7 @@ core_target_open (const char *arg, int from_tty)
|
|||
gdb::unique_xmalloc_ptr<char> filename (tilde_expand (arg));
|
||||
if (strlen (filename.get ()) != 0
|
||||
&& !IS_ABSOLUTE_PATH (filename.get ()))
|
||||
filename = gdb_abspath (filename.get ());
|
||||
filename = make_unique_xstrdup (gdb_abspath (filename.get ()).c_str ());
|
||||
|
||||
flags = O_BINARY | O_LARGEFILE;
|
||||
if (write_files)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue