[Lldb-commits] [lldb] [lldb-dap] Add process picker command to VS Code extension (PR #197513)
Ebuka Ezike via lldb-commits
lldb-commits at lists.llvm.org
Wed May 13 10:50:31 PDT 2026
================
@@ -0,0 +1,101 @@
+import { execFile } from "node:child_process";
+import { promisify } from "node:util";
+
+/** Represents a single process running on the system. */
+export interface Process {
+ /** Process ID. */
+ id: number;
+
+ /** Command that was used to start the process. */
+ command: string;
+
+ /** The full command including arguments that was used to start the process. */
+ arguments: string;
+}
+
+export interface ProcessTree {
+ listAllProcesses(): Promise<Process[]>;
+}
+
+/**
+ * Options passed to {@link LldbDapProcessTree} to target a specific platform.
+ */
+export interface LldbDapProcessTreeOptions {
+ /** Name of the LLDB platform to select (e.g. "host", "remote-linux"). */
+ platformName?: string;
+ /** URL to connect the platform to, for remote platforms. */
+ platformUrl?: string;
+}
+
+/**
+ * Runs a command and captures its stdout. Abstracted so tests can inject a
+ * stub without spawning a real process.
+ */
+export type ExecFn = (exe: string, args: string[]) => Promise<{ stdout: string }>;
----------------
da-viper wrote:
The `execfn` can also fail if the platform url is wrong and we will silently fail. we need the stderr too.
https://github.com/llvm/llvm-project/pull/197513
More information about the lldb-commits
mailing list