Dear Steve and lldb-dev,
(starting a new thread to give a better, more appropriate, thread title)
I’ve investigated a little bit more and I am coming to understand there is a big difference at the moment in how lldb initiates target processes in darwin vs linux (see the comparative ps output details below). Perhaps it is more direct on linux in order to avoid having to port the debugserver?
Any insight into plans for lldb on linux would be appreciated. I do see there are significant architectural differences at the moment, in that lldb on darwin goes through the debugserver process. I wonder if that is intended as a temporary quick fix, or done with an eye to simplification. e.g. I don’t know, but perhaps it is much simpler to ptrace directly on linux than to use a separate process? I’m pretty clueless here, and just starting to explore lldb on linux, so feel free to point me towards background threads or information I might wish to review.
On darwin, lldb starts a debugserver child process, and debugserver in turn starts a child process to contain the debug target a.out.
UID PID PPID
2086 42103 22537 0 0:00.07 ttyp0 0:00.16 …/lldb a.out
2086 42104 42103 0 0:00.01 ?? 0:00.02 /Users/jaten/pkg/llvm+lldb+ldc/llvm-2.8/tools/lldb/build/Debug/LLDB.framework/Versions/A/Resources/debugserver localhost:11358 --native-regs --setsid
2086 42105 42104 0 0:00.00 ?? 0:00.00 /Users/jaten/pkg/llvm+lldb+ldc/llvm-2.8/tools/lldb/build/Debug/test-lldb/a.out
On linux, at the moment, what I see in contrast is that lldb is the direct parent of the debug target (a.out here).
jaten 4532 0.0 0.3 25752 8160 pts/3 Ss 03:59 0:01 | _ /bin/bash --noediting -i
jaten 22645 0.6 0.8 148260 18256 pts/3 Sl+ 11:57 0:00 | | _ ./lldb test-lldb/a.out
jaten 22650 0.0 0.0 11728 960 pts/11 Ts+ 11:58 0:00 | | _ /home/jaten/pkg/latest-svn-llvm/llvm-build-r127600-with-lldb/Release+Debug+Profile+Asserts/bin/test-lldb/a.out