[Lldb-commits] [PATCH] Introduce a ProcessStatus monitor abstraction.

Zachary Turner zturner at google.com
Thu Oct 30 13:09:35 PDT 2014


Hi clayborg, jingham,

Note: This patch is optional, and was something I arrived at as an intermediate step while trying to implement debugging on Windows in such a way that ProcessWindows::DoLaunch() could reuse Host::LaunchProcess.  While I ultimately ended up needing to circumvent the entire Host::LaunchProcess codepath entirely for techncial reasons, making this patch not strictly necessary for my subsequent patch, the abstraction still seems generally useful for creating reusable code, so I'm posting it here anyway.
------

This is a very general abstraction useful for local debugging as well as remote debugging, that allows implementors to customize the way in which processes are monitored for changes in status after being launched.

Additionally, a Windows implementation is provided that waits for a process to exit and notifies listeners, and Host::LaunchProcess uses this implementation.

This change is intended to provide no functional change, and consists mostly of new code, not altered code.  The altered code that does exist only offers a fallback path so that if someone does not specify a ProcessStatusMonitor, it simply falls back to the old code path so that everything behaves as before.

http://reviews.llvm.org/D6036

Files:
  include/lldb/Host/HostNativeProcessBase.h
  include/lldb/Host/HostProcess.h
  include/lldb/Host/MonitoringProcessLauncher.h
  include/lldb/Host/ProcessStatusMonitor.h
  include/lldb/Host/windows/ExitStatusMonitorWindows.h
  include/lldb/Host/windows/HostProcessWindows.h
  include/lldb/lldb-forward.h
  source/Host/CMakeLists.txt
  source/Host/common/Host.cpp
  source/Host/common/HostProcess.cpp
  source/Host/common/MonitoringProcessLauncher.cpp
  source/Host/common/ProcessStatusMonitor.cpp
  source/Host/windows/ExitStatusMonitorWindows.cpp
  source/Host/windows/HostProcessWindows.cpp
  source/Host/windows/ProcessLauncherWindows.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6036.15575.patch
Type: text/x-patch
Size: 17095 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141030/110799e9/attachment.bin>


More information about the lldb-commits mailing list