[Lldb-commits] [PATCH] D93951: [vscode] Improve runInTerminal and support linux

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 7 10:18:01 PST 2021

wallace marked 5 inline comments as done.
wallace added inline comments.

Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2994
+  // signal to prevent being paused forever.
+  const char *timeout_env_var = getenv("LLDB_VSCODE_RIT_TIMEOUT_IN_MS");
+  int timeout_in_ms =
clayborg wrote:
> Why are we using env vars for some things and options values for others? We should probably pass this in as an argument. We are also polluting the env vars of the new process we will exec if we leave this in the environment
I'm only using this for testing, so that the python tests doesn't take 10 seconds waiting for the timeout to happen. The user shouldn't need to change this for any reason.

Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:3001
+      const char *target = target_arg.getValue();
+      execv(target, argv + target_arg.getIndex() + 2);
clayborg wrote:
> I assume env vars are being inherited from this process?
yes, that's the default behavior

Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:3018
+  llvm::SmallString<256> program_path(argv[0]);
+  llvm::sys::fs::make_absolute(program_path);
+  g_vsc.debug_adaptor_path = program_path.str().str();
clayborg wrote:
> Might be worth checking if there is a llvm file system call to determine the program path already?
it seems there isn't

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list