[lldb-dev] Process monitoring Host/Plugin interactions

Zachary Turner zturner at google.com
Fri Oct 24 11:53:42 PDT 2014


I'm going to tackle implementing process monitoring for Windows next, and
I've started going over how this works for other platforms.

There's a bit of a confusing interaction between Host, Target, and the
individual plugins, and I'm wondering if it might make more sense to put
the monitoring code somewhere other than Host.

>From what I can tell, launching a process for debugging goes something like
this:

1) Call ProcessPlugin::DoLaunch
2) some system calls to actually launch the process
3) Call Host::StartMonitoringChildProcess with callback set to somewhere in
your plugin.
4) The monitoring thread (in Host) periodically calls back into
ProcessPlugin

For starters, this seems to be broken in the case where the
ProcessLaunchInfo has pre-set an m_monitor_callback because the plugins end
up just ignoring this and using their own callback.

Ultimately, how a process is monitored is going to depend on the plugin, so
shouldn't StartMonitoringChildProcess also be part of the plugin?  In what
situation would you ever want to monitor a child process that is not under
the control of some process plugin?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20141024/4250d3dc/attachment.html>


More information about the lldb-dev mailing list