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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 17 08:13:32 PST 2019


labath added a comment.

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

> +#if defined(_WIN32)
>  +TEST(ArgsTest, GetFlattenWindowsCommandString) {
>  +  Args args;
>  +  args.AppendArgument("D:\\launcher.exe");
>  +  args.AppendArgument("--log=abc def");
>  +
>  +  std::string stdstr;
>  +  ASSERT_TRUE(args.GetFlattenWindowsCommandString(stdstr));
>  +  EXPECT_EQ(stdstr, "\"D:\\launcher.exe\" \"--log=abc def\"");
>  +}
>  +#endif


BTW, if this is going to end up `#ifdef`ed (I know you need to do that because `flattenWindowsCommandLine` is `#ifdef _WIN32`), then I believe it should go somewhere under `Host/windows`. It's not used outside of windows code anyway...

We  could put it in `Args.h`, but then we'd need to un-ifdef the llvm function (which I believe we could do, but we'd need to get that ok'd by the llvm folks).


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

https://reviews.llvm.org/D56230





More information about the lldb-commits mailing list