[lldb] Fix TestSettings.test_pass_host_env_vars on windows
authorPavel Labath <pavel@labath.sk>
Wed, 25 Mar 2020 12:39:05 +0000 (13:39 +0100)
committerPavel Labath <pavel@labath.sk>
Mon, 30 Mar 2020 14:06:52 +0000 (16:06 +0200)
commit908f78f3c19805ee7386186072407a541c9fb167
treecc132555b24b9d3cb98a4d67b45f29cd53776fdf
parent703a1b8caf09a5262a45c2179b8131922f71cf25
[lldb] Fix TestSettings.test_pass_host_env_vars on windows

Summary:
A defensive check in ProcessLauncherWindows meant that we would never
attempt to launch a process with a completely empty environment -- the
host environment would be used instead. Instead, I make the function add
an extra null wchar_t at the end of an empty environment. The
documentation on this is a bit fuzzy, but it seems to be what is needed
to make windows accept these kinds of environments.

Reviewers: amccarth, friss

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D76835
lldb/source/Host/windows/ProcessLauncherWindows.cpp
lldb/test/API/commands/settings/TestSettings.py