[Lldb-commits] [PATCH] D56230: [gdb-remote] Use lldb's portable Host::GetEnvironment() instead of getenv

Hui Huang via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 21 22:11:15 PST 2019


Hui added a comment.

In D56230#1361746 <https://reviews.llvm.org/D56230#1361746>, @Hui wrote:

> It could be the llvm::sys::flattenWindowsCommandLine issue to flatten the command “dir c:\" for Windows Command Terminal.
>  However it is not an issue for PS or MingGW.
>
> It is observed the flattened one is
>
>   "\"C:\\WINDOWS\\system32\\cmd.exe\" /C \" dir c:\\\\\" "
>
>
> which will be interpreted as the following that is not accepted by CMD.exe.(dir c:\ or dir c:\.\ is fine. There is no '\' directory or file on my Drive c).
>  However it is accepted by PS and MingGW.
>
>   "C:\\WINDOWS\\system32\\cmd.exe" /C " dir c:\\"
>


Hello labath. I am still thinking that it might be **llvm::sys::flattenWindowsCommandLine** issue. As you can see, in the flattened string "\"C:\\WINDOWS\\system32\\cmd.exe\" /C \" dir c:\\\\\",

the '\\' is not doubled for **"C:\\WINDOWS"**, while the '\\' is doubled for **"c:\\"** as **"c:\\\\"**


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56230/new/

https://reviews.llvm.org/D56230





More information about the lldb-commits mailing list