diff options
author | Tom Tromey <tromey@adacore.com> | 2021-07-26 07:34:37 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2021-07-26 07:34:37 -0600 |
commit | 0b73bf7fa3f5f84f0dc44bd3f971520474e020e3 (patch) | |
tree | 932a1e939d66d16cb2dfaa1827a76256970c8c82 /gdbserver | |
parent | c9bd98593b785d9bf5f39c7aa74ed0226a23b830 (diff) | |
download | fsf-binutils-gdb-0b73bf7fa3f5f84f0dc44bd3f971520474e020e3.zip fsf-binutils-gdb-0b73bf7fa3f5f84f0dc44bd3f971520474e020e3.tar.gz fsf-binutils-gdb-0b73bf7fa3f5f84f0dc44bd3f971520474e020e3.tar.bz2 |
Fix the Windows build
The gdb build was broken on Windows after the patch to change
get_inferior_cwd. This patch fixes the build.
Diffstat (limited to 'gdbserver')
-rw-r--r-- | gdbserver/win32-low.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index 5c7946b..1e97f91 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -559,7 +559,7 @@ static BOOL create_process (const char *program, char *args, DWORD flags, PROCESS_INFORMATION *pi) { - const char *inferior_cwd = get_inferior_cwd (); + const std::string &inferior_cwd = get_inferior_cwd (); BOOL ret; size_t argslen, proglen; @@ -580,9 +580,9 @@ create_process (const char *program, char *args, flags, /* start flags */ NULL, /* environment */ /* current directory */ - (inferior_cwd == NULL + (inferior_cwd.empty () ? NULL - : gdb_tilde_expand (inferior_cwd).c_str()), + : gdb_tilde_expand (inferior_cwd.c_str ()).c_str()), &si, /* start info */ pi); /* proc info */ |