labath added a comment.

> It is not that applicable for the windows process launcher to determine which 
> entry in the args needs to be quoted unless given very specific flag or 
> option.

Why not? Given the argv parsing rules described here 
https://docs.microsoft.com/en-us/cpp/cpp/parsing-cpp-command-line-arguments?view=vs-2017,
 it sounds like it should be possible to create an algorithm doing the reverse 
mapping.
Something like this ought to do the trick:

  for(string: Args) {
    if (string.contains_either_of(" \t\"")  {
      double_the_amount_of_backslashes_in_front_of_every_quote_char(string);
      string = '"' + string '"';
    }
    cmdline += " " + string;
  }


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D56230



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to