[Lldb-commits] [lldb] [lldb] Fix FindProcessImpl() for iOS simulators (PR #139174)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 20 14:18:59 PDT 2025


jasonmolenda wrote:

> Hi @JDevlieghere,
> 
> I think I know why - it's by design: In the `Host::FindProcessImpl()` for iOS simulator, after getting all processes in the macOS, it filters out the processes which are being debugged 

FWIW in general this is done so that you can have multiple debug sessions debugging the same binary being run multiple times.  You run one lldb and attach to inferior-process(1), then you run it again, inferior-process(2), and want to attach to it from a second lldb.  We don't want to show the inferior-process(1) as an attachable process at all, because only one debugger can control a process.  So we only show inferior-process(2).

I haven't followed along with the PR/code enough to know if that's *applicable* in this case, but that's the general thinking with lldb's process list algorithms - we are trying to show processes that you might be able to attach to.  In debugserver well also filter out procsses that are zombies and such, iirc.

https://github.com/llvm/llvm-project/pull/139174


More information about the lldb-commits mailing list