I've got some preliminary but functioning work in place in order to support
self-debugging. Immediately forthcoming is two patches, summarized below, which
implement basic support for self-debugging on Linux. I've leveraged the
ProcessMonitor architecture on Linux in order to do this, so the first patch is
a refactor of ProcessMonitor to allow me to create a different implementation of
it. The second patch actually fills in the self-debugging implementation.
[PATCH 1/2] Refactor ProcessMonitor into an abstract base class.
[PATCH 2/2] Support debugging yourself on Linux.
There's still some issues:
* I needed to disable JITLoaderGDB  in order to prevent lldb from attempting
to set a breakpoint at attach. I'm also not clear on what JITLoaderGDB does
even after perusing the code, so I'm not sure if disabling it is the right
thing to do.
* I needed to disable LLDB copying it's stdin to it's inferior's  as it
would result in multiple threads reading from stdin - making it impossible to
use the prompt. This behavior makes sense to me if the debugee is launched
from LLDB, but I'm not clear on why LLDB attempts to do it when you've
attached to your debugee.
* "thread list" returns nothing. I think there's a larger problem here. Needs