aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat/fork-inferior.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-06-19 11:13:14 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-06-27 15:15:26 +0100
commit632c5372771a6f167f3be554b2f84582169ffc07 (patch)
treea89a65b565b0d3631729a40651f2d880f16a5206 /gdb/nat/fork-inferior.c
parent88aad97c21de7a39f8e63467674ef936b3e9a86d (diff)
downloadgdb-632c5372771a6f167f3be554b2f84582169ffc07.zip
gdb-632c5372771a6f167f3be554b2f84582169ffc07.tar.gz
gdb-632c5372771a6f167f3be554b2f84582169ffc07.tar.bz2
gdb: add overloads of gdb_tilde_expand
Like the previous commit, add two overloads of gdb_tilde_expand, one takes std::string and other takes gdb::unique_xmalloc_ptr<char>. Make use of these overloads throughout GDB and gdbserver. There should be no user visible changes after this commit. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/nat/fork-inferior.c')
-rw-r--r--gdb/nat/fork-inferior.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index 2fd9cba..41765b1 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -321,7 +321,7 @@ fork_inferior (const char *exec_file, const std::string &allargs, char **env,
{
/* Expand before forking because between fork and exec, the child
process may only execute async-signal-safe operations. */
- inferior_cwd = gdb_tilde_expand (inferior_cwd.c_str ());
+ inferior_cwd = gdb_tilde_expand (inferior_cwd);
}
/* If there's any initialization of the target layers that must