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

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 12 01:45:23 PST 2019


labath added a comment.

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

> I think the key problem here is to make sure the argument will be treated as a single argument to the process launcher.


Can you elaborate on that? I still don't see what is the problem with the solution I proposed.

> To be specific to this case only, could we just provide a quote char to argument log file path and log channels on Windows?
> 
> The downside is one more #if is introduced.

Yes, but this is not a problem specific to this code. Plenty of code appends strings to the Args class which may contain spaces all of those would be wrong if they make it's way to the windows process launcher, so it's logical to fix the problem there, as it all affected code paths have to go through there and it alone has enough information to make the right decision on how to quote things.


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

https://reviews.llvm.org/D56230





More information about the llvm-commits mailing list