[Lldb-commits] [lldb] [lldb-dap] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 8 18:01:24 PST 2024
================
@@ -1465,11 +1462,7 @@ CreateRunInTerminalReverseRequest(const llvm::json::Object &launch_request,
llvm::StringRef key = envs.GetNameAtIndex(index);
llvm::StringRef value = envs.GetValueAtIndex(index);
- if (key.empty())
- g_dap.SendOutput(OutputType::Stderr,
- "empty environment variable for value: \"" +
- value.str() + '\"');
- else
----------------
ashgti wrote:
Ah, your right, I mixed that up. Trying to set an empty key in lldb produces:
```
(lldb) settings set target.env-vars =1
error: empty dictionary key
```
However, if I have `"env": ["=123"],` in my launch.json I do end up with the empty "" being set at runtime, at least on macOS, which is kinda of wild that it works.
```
(vsocde-repl) `expr (char*)getenv("")
(lldb) expr (char*)getenv("")
(char *) $0 = 0x000000016fdff65f "123"
```
https://github.com/llvm/llvm-project/pull/115561
More information about the lldb-commits
mailing list