+2018-05-10 Joel Brobecker <brobecker@adacore.com>
+
+ PR server/23158:
+ * win32-low.c (create_process): Only call gdb_tilde_expand if
+ inferior_cwd is not NULL.
+
2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
* i387-fp.c (i387_cache_to_xsave): Only write x87 control
DWORD flags, PROCESS_INFORMATION *pi)
{
const char *inferior_cwd = get_inferior_cwd ();
- std::string expanded_infcwd = gdb_tilde_expand (inferior_cwd);
BOOL ret;
#ifdef _WIN32_WCE
if (inferior_cwd != NULL)
{
+ std::string expanded_infcwd = gdb_tilde_expand (inferior_cwd);
std::replace (expanded_infcwd.begin (), expanded_infcwd.end (),
'/', '\\');
wcwd = alloca ((expanded_infcwd.size () + 1) * sizeof (wchar_t));
TRUE, /* inherit handles */
flags, /* start flags */
NULL, /* environment */
- expanded_infcwd.c_str (), /* current directory */
+ /* current directory */
+ (inferior_cwd == NULL
+ ? NULL
+ : gdb_tilde_expand (inferior_cwd).c_str()),
&si, /* start info */
pi); /* proc info */
#endif