vogelsgesang wrote:

> Is there a way we can use the LLDB platform layer to pick processes?

See discussion further up in the thread ([first 
comment](https://github.com/llvm/llvm-project/pull/128943#issuecomment-2686308012)
 and follow-up messages). It seems the [final 
blocker](https://github.com/llvm/llvm-project/pull/128943#issuecomment-2686357602)
 was that we didn't have access to the `debugAdapterExecutable` variable - 
which turned out to be wrong, we do actually have access to that variable, also 
see [this 
comment](https://github.com/llvm/llvm-project/pull/128943#discussion_r1976269198).

That being said, I am not sure if it's worth using the lldb layer for that...
 
> This code, IIUC is just running a local command to pick the process from the 
> current host. But people might be debugging remotely by connecting to a 
> remote platform.

When you SSH-connect into a remote host, the complete `lldb-dap` VS-Code 
extension is actually installed in the remote host, not on your local machine. 
As such, the call to `ps` actually happens on the remote host, and lists the 
process from the remote host. So at least from that point of view, I think we 
are fine.

However, if the user does connect remotely from lldb via gdbserver to some 
other host, then we would indeed be running the `ps` command on the wrong 
machine. Not sure if we even support this today, though...

Does

```
{
  "name": "Local Debug Server",
  "type": "lldb-dap",
  "request": "attach",
   "gdb-remote-hostname": "hostname",
  "gdb-remote-port": 2345,
  "pid": 1234
}
```

currently even work? Also, does the gdb-remote protocol even offer capabilities 
for process-picking? (Not sure, I seldomly used gdb-remote functionality so 
far, except for connect to `rr` - for which I am impatiently awaiting 
first-class lldb-support 🙂 )

https://github.com/llvm/llvm-project/pull/128943
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to