Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 1 | //===-- ProcessMonitor.h -------------------------------------- -*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef liblldb_ProcessMonitor_H_ |
| 11 | #define liblldb_ProcessMonitor_H_ |
| 12 | |
| 13 | // C Includes |
| 14 | #include <semaphore.h> |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 15 | #include <signal.h> |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 16 | |
| 17 | // C++ Includes |
| 18 | // Other libraries and framework includes |
| 19 | #include "lldb/lldb-types.h" |
Zachary Turner | 39de311 | 2014-09-09 20:54:56 +0000 | [diff] [blame] | 20 | #include "lldb/Host/HostThread.h" |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 21 | #include "lldb/Host/Mutex.h" |
| 22 | |
| 23 | namespace lldb_private |
| 24 | { |
| 25 | class Error; |
| 26 | class Module; |
| 27 | class Scalar; |
| 28 | } // End lldb_private namespace. |
| 29 | |
| 30 | class ProcessLinux; |
| 31 | class Operation; |
| 32 | |
| 33 | /// @class ProcessMonitor |
| 34 | /// @brief Manages communication with the inferior (debugee) process. |
| 35 | /// |
| 36 | /// Upon construction, this class prepares and launches an inferior process for |
| 37 | /// debugging. |
| 38 | /// |
| 39 | /// Changes in the inferior process state are propagated to the associated |
| 40 | /// ProcessLinux instance by calling ProcessLinux::SendMessage with the |
| 41 | /// appropriate ProcessMessage events. |
| 42 | /// |
| 43 | /// A purposely minimal set of operations are provided to interrogate and change |
| 44 | /// the inferior process state. |
| 45 | class ProcessMonitor |
| 46 | { |
| 47 | public: |
| 48 | |
| 49 | /// Launches an inferior process ready for debugging. Forms the |
| 50 | /// implementation of Process::DoLaunch. |
Andrew Kaylor | 6578cb6 | 2013-07-09 22:36:48 +0000 | [diff] [blame] | 51 | ProcessMonitor(ProcessPOSIX *process, |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 52 | lldb_private::Module *module, |
| 53 | char const *argv[], |
| 54 | char const *envp[], |
| 55 | const char *stdin_path, |
| 56 | const char *stdout_path, |
| 57 | const char *stderr_path, |
Daniel Malea | 6217d2a | 2013-01-08 14:49:22 +0000 | [diff] [blame] | 58 | const char *working_dir, |
Todd Fiala | 0bce1b6 | 2014-08-17 00:10:50 +0000 | [diff] [blame] | 59 | const lldb_private::ProcessLaunchInfo &launch_info, |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 60 | lldb_private::Error &error); |
| 61 | |
Andrew Kaylor | 6578cb6 | 2013-07-09 22:36:48 +0000 | [diff] [blame] | 62 | ProcessMonitor(ProcessPOSIX *process, |
Johnny Chen | 25e68e3 | 2011-06-14 19:19:50 +0000 | [diff] [blame] | 63 | lldb::pid_t pid, |
| 64 | lldb_private::Error &error); |
| 65 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 66 | ~ProcessMonitor(); |
| 67 | |
Andrew Kaylor | 93132f5 | 2013-05-28 23:04:25 +0000 | [diff] [blame] | 68 | enum ResumeSignals |
| 69 | { |
| 70 | eResumeSignalNone = 0 |
| 71 | }; |
| 72 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 73 | /// Provides the process number of debugee. |
| 74 | lldb::pid_t |
| 75 | GetPID() const { return m_pid; } |
| 76 | |
| 77 | /// Returns the process associated with this ProcessMonitor. |
| 78 | ProcessLinux & |
| 79 | GetProcess() { return *m_process; } |
| 80 | |
Greg Clayton | 710dd5a | 2011-01-08 20:28:42 +0000 | [diff] [blame] | 81 | /// Returns a file descriptor to the controlling terminal of the inferior |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 82 | /// process. |
| 83 | /// |
Greg Clayton | 710dd5a | 2011-01-08 20:28:42 +0000 | [diff] [blame] | 84 | /// Reads from this file descriptor yield both the standard output and |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 85 | /// standard error of this debugee. Even if stderr and stdout were |
| 86 | /// redirected on launch it may still happen that data is available on this |
| 87 | /// descriptor (if the inferior process opens /dev/tty, for example). |
| 88 | /// |
| 89 | /// If this monitor was attached to an existing process this method returns |
| 90 | /// -1. |
| 91 | int |
| 92 | GetTerminalFD() const { return m_terminal_fd; } |
| 93 | |
| 94 | /// Reads @p size bytes from address @vm_adder in the inferior process |
| 95 | /// address space. |
| 96 | /// |
| 97 | /// This method is provided to implement Process::DoReadMemory. |
| 98 | size_t |
| 99 | ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size, |
| 100 | lldb_private::Error &error); |
| 101 | |
| 102 | /// Writes @p size bytes from address @p vm_adder in the inferior process |
| 103 | /// address space. |
| 104 | /// |
| 105 | /// This method is provided to implement Process::DoWriteMemory. |
| 106 | size_t |
| 107 | WriteMemory(lldb::addr_t vm_addr, const void *buf, size_t size, |
| 108 | lldb_private::Error &error); |
| 109 | |
| 110 | /// Reads the contents from the register identified by the given (architecture |
| 111 | /// dependent) offset. |
| 112 | /// |
| 113 | /// This method is provided for use by RegisterContextLinux derivatives. |
| 114 | bool |
Ashok Thirumurthi | acbb1a5 | 2013-05-09 19:59:47 +0000 | [diff] [blame] | 115 | ReadRegisterValue(lldb::tid_t tid, unsigned offset, const char *reg_name, |
Daniel Malea | f0da371 | 2012-12-18 19:50:15 +0000 | [diff] [blame] | 116 | unsigned size, lldb_private::RegisterValue &value); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 117 | |
| 118 | /// Writes the given value to the register identified by the given |
| 119 | /// (architecture dependent) offset. |
| 120 | /// |
| 121 | /// This method is provided for use by RegisterContextLinux derivatives. |
| 122 | bool |
Ashok Thirumurthi | acbb1a5 | 2013-05-09 19:59:47 +0000 | [diff] [blame] | 123 | WriteRegisterValue(lldb::tid_t tid, unsigned offset, const char *reg_name, |
Daniel Malea | f0da371 | 2012-12-18 19:50:15 +0000 | [diff] [blame] | 124 | const lldb_private::RegisterValue &value); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 125 | |
Stephen Wilson | ade1aea | 2011-01-19 01:31:38 +0000 | [diff] [blame] | 126 | /// Reads all general purpose registers into the specified buffer. |
| 127 | bool |
Matt Kopec | 7de4846 | 2013-03-06 17:20:48 +0000 | [diff] [blame] | 128 | ReadGPR(lldb::tid_t tid, void *buf, size_t buf_size); |
Stephen Wilson | ade1aea | 2011-01-19 01:31:38 +0000 | [diff] [blame] | 129 | |
Matt Kopec | 58c0b96 | 2013-03-20 20:34:35 +0000 | [diff] [blame] | 130 | /// Reads generic floating point registers into the specified buffer. |
Stephen Wilson | ade1aea | 2011-01-19 01:31:38 +0000 | [diff] [blame] | 131 | bool |
Matt Kopec | 7de4846 | 2013-03-06 17:20:48 +0000 | [diff] [blame] | 132 | ReadFPR(lldb::tid_t tid, void *buf, size_t buf_size); |
Stephen Wilson | ade1aea | 2011-01-19 01:31:38 +0000 | [diff] [blame] | 133 | |
Matt Kopec | 58c0b96 | 2013-03-20 20:34:35 +0000 | [diff] [blame] | 134 | /// Reads the specified register set into the specified buffer. |
| 135 | /// For instance, the extended floating-point register set. |
| 136 | bool |
| 137 | ReadRegisterSet(lldb::tid_t tid, void *buf, size_t buf_size, unsigned int regset); |
| 138 | |
Peter Collingbourne | 10bc010 | 2011-06-03 20:41:02 +0000 | [diff] [blame] | 139 | /// Writes all general purpose registers into the specified buffer. |
| 140 | bool |
Matt Kopec | 7de4846 | 2013-03-06 17:20:48 +0000 | [diff] [blame] | 141 | WriteGPR(lldb::tid_t tid, void *buf, size_t buf_size); |
Peter Collingbourne | 10bc010 | 2011-06-03 20:41:02 +0000 | [diff] [blame] | 142 | |
Matt Kopec | 58c0b96 | 2013-03-20 20:34:35 +0000 | [diff] [blame] | 143 | /// Writes generic floating point registers into the specified buffer. |
Peter Collingbourne | 10bc010 | 2011-06-03 20:41:02 +0000 | [diff] [blame] | 144 | bool |
Matt Kopec | 7de4846 | 2013-03-06 17:20:48 +0000 | [diff] [blame] | 145 | WriteFPR(lldb::tid_t tid, void *buf, size_t buf_size); |
Peter Collingbourne | 10bc010 | 2011-06-03 20:41:02 +0000 | [diff] [blame] | 146 | |
Matt Kopec | 58c0b96 | 2013-03-20 20:34:35 +0000 | [diff] [blame] | 147 | /// Writes the specified register set into the specified buffer. |
| 148 | /// For instance, the extended floating-point register set. |
| 149 | bool |
| 150 | WriteRegisterSet(lldb::tid_t tid, void *buf, size_t buf_size, unsigned int regset); |
| 151 | |
Richard Mitton | 0a55835 | 2013-10-17 21:14:00 +0000 | [diff] [blame] | 152 | /// Reads the value of the thread-specific pointer for a given thread ID. |
| 153 | bool |
| 154 | ReadThreadPointer(lldb::tid_t tid, lldb::addr_t &value); |
| 155 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 156 | /// Writes a siginfo_t structure corresponding to the given thread ID to the |
| 157 | /// memory region pointed to by @p siginfo. |
| 158 | bool |
Daniel Malea | a35970a | 2012-11-23 18:09:58 +0000 | [diff] [blame] | 159 | GetSignalInfo(lldb::tid_t tid, void *siginfo, int &ptrace_err); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 160 | |
| 161 | /// Writes the raw event message code (vis-a-vis PTRACE_GETEVENTMSG) |
| 162 | /// corresponding to the given thread IDto the memory pointed to by @p |
| 163 | /// message. |
| 164 | bool |
| 165 | GetEventMessage(lldb::tid_t tid, unsigned long *message); |
| 166 | |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 167 | /// Resumes the given thread. If @p signo is anything but |
| 168 | /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread. |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 169 | bool |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 170 | Resume(lldb::tid_t tid, uint32_t signo); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 171 | |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 172 | /// Single steps the given thread. If @p signo is anything but |
| 173 | /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread. |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 174 | bool |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 175 | SingleStep(lldb::tid_t tid, uint32_t signo); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 176 | |
Ed Maste | 4e0999b | 2014-04-01 18:14:06 +0000 | [diff] [blame] | 177 | /// Terminate the traced process. |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 178 | bool |
Ed Maste | 4e0999b | 2014-04-01 18:14:06 +0000 | [diff] [blame] | 179 | Kill(); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 180 | |
Greg Clayton | 743ecf4 | 2012-10-16 20:20:18 +0000 | [diff] [blame] | 181 | lldb_private::Error |
Matt Kopec | 085d6ce | 2013-05-31 22:00:07 +0000 | [diff] [blame] | 182 | Detach(lldb::tid_t tid); |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 183 | |
Andrew Kaylor | bc68b43 | 2013-07-10 21:57:27 +0000 | [diff] [blame] | 184 | /// Stops the monitoring the child process thread. |
| 185 | void |
| 186 | StopMonitor(); |
| 187 | |
Andrew Kaylor | 93132f5 | 2013-05-28 23:04:25 +0000 | [diff] [blame] | 188 | /// Stops the requested thread and waits for the stop signal. |
| 189 | bool |
| 190 | StopThread(lldb::tid_t tid); |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 191 | |
Andrew Kaylor | d4d5499 | 2013-09-17 00:30:24 +0000 | [diff] [blame] | 192 | // Waits for the initial stop message from a new thread. |
| 193 | bool |
| 194 | WaitForInitialTIDStop(lldb::tid_t tid); |
| 195 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 196 | private: |
Andrew Kaylor | 6578cb6 | 2013-07-09 22:36:48 +0000 | [diff] [blame] | 197 | ProcessLinux *m_process; |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 198 | |
Zachary Turner | 39de311 | 2014-09-09 20:54:56 +0000 | [diff] [blame] | 199 | lldb_private::HostThread m_operation_thread; |
| 200 | lldb_private::HostThread m_monitor_thread; |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 201 | lldb::pid_t m_pid; |
| 202 | int m_terminal_fd; |
| 203 | |
Daniel Malea | 1efb418 | 2013-09-16 23:12:18 +0000 | [diff] [blame] | 204 | // current operation which must be executed on the priviliged thread |
| 205 | Operation *m_operation; |
| 206 | lldb_private::Mutex m_operation_mutex; |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 207 | |
Daniel Malea | 1efb418 | 2013-09-16 23:12:18 +0000 | [diff] [blame] | 208 | // semaphores notified when Operation is ready to be processed and when |
| 209 | // the operation is complete. |
| 210 | sem_t m_operation_pending; |
| 211 | sem_t m_operation_done; |
| 212 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 213 | |
Johnny Chen | 25e68e3 | 2011-06-14 19:19:50 +0000 | [diff] [blame] | 214 | struct OperationArgs |
| 215 | { |
| 216 | OperationArgs(ProcessMonitor *monitor); |
| 217 | |
| 218 | ~OperationArgs(); |
| 219 | |
| 220 | ProcessMonitor *m_monitor; // The monitor performing the attach. |
| 221 | sem_t m_semaphore; // Posted to once operation complete. |
| 222 | lldb_private::Error m_error; // Set if process operation failed. |
| 223 | }; |
| 224 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 225 | /// @class LauchArgs |
| 226 | /// |
| 227 | /// @brief Simple structure to pass data to the thread responsible for |
| 228 | /// launching a child process. |
Johnny Chen | 25e68e3 | 2011-06-14 19:19:50 +0000 | [diff] [blame] | 229 | struct LaunchArgs : OperationArgs |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 230 | { |
| 231 | LaunchArgs(ProcessMonitor *monitor, |
| 232 | lldb_private::Module *module, |
| 233 | char const **argv, |
| 234 | char const **envp, |
| 235 | const char *stdin_path, |
| 236 | const char *stdout_path, |
Daniel Malea | 6217d2a | 2013-01-08 14:49:22 +0000 | [diff] [blame] | 237 | const char *stderr_path, |
Todd Fiala | 0bce1b6 | 2014-08-17 00:10:50 +0000 | [diff] [blame] | 238 | const char *working_dir, |
| 239 | const lldb_private::ProcessLaunchInfo &launch_info); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 240 | |
| 241 | ~LaunchArgs(); |
| 242 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 243 | lldb_private::Module *m_module; // The executable image to launch. |
| 244 | char const **m_argv; // Process arguments. |
| 245 | char const **m_envp; // Process environment. |
| 246 | const char *m_stdin_path; // Redirect stdin or NULL. |
| 247 | const char *m_stdout_path; // Redirect stdout or NULL. |
| 248 | const char *m_stderr_path; // Redirect stderr or NULL. |
Daniel Malea | 6217d2a | 2013-01-08 14:49:22 +0000 | [diff] [blame] | 249 | const char *m_working_dir; // Working directory or NULL. |
Todd Fiala | 0bce1b6 | 2014-08-17 00:10:50 +0000 | [diff] [blame] | 250 | const lldb_private::ProcessLaunchInfo &m_launch_info; |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 251 | }; |
| 252 | |
| 253 | void |
Johnny Chen | 25e68e3 | 2011-06-14 19:19:50 +0000 | [diff] [blame] | 254 | StartLaunchOpThread(LaunchArgs *args, lldb_private::Error &error); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 255 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 256 | static void * |
Johnny Chen | 25e68e3 | 2011-06-14 19:19:50 +0000 | [diff] [blame] | 257 | LaunchOpThread(void *arg); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 258 | |
| 259 | static bool |
| 260 | Launch(LaunchArgs *args); |
| 261 | |
Johnny Chen | 25e68e3 | 2011-06-14 19:19:50 +0000 | [diff] [blame] | 262 | struct AttachArgs : OperationArgs |
| 263 | { |
| 264 | AttachArgs(ProcessMonitor *monitor, |
| 265 | lldb::pid_t pid); |
| 266 | |
| 267 | ~AttachArgs(); |
| 268 | |
| 269 | lldb::pid_t m_pid; // pid of the process to be attached. |
| 270 | }; |
| 271 | |
| 272 | void |
| 273 | StartAttachOpThread(AttachArgs *args, lldb_private::Error &error); |
| 274 | |
Johnny Chen | 25e68e3 | 2011-06-14 19:19:50 +0000 | [diff] [blame] | 275 | static void * |
| 276 | AttachOpThread(void *args); |
| 277 | |
| 278 | static bool |
| 279 | Attach(AttachArgs *args); |
| 280 | |
Matt Kopec | 085d6ce | 2013-05-31 22:00:07 +0000 | [diff] [blame] | 281 | static bool |
| 282 | SetDefaultPtraceOpts(const lldb::pid_t); |
| 283 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 284 | static void |
Johnny Chen | 25e68e3 | 2011-06-14 19:19:50 +0000 | [diff] [blame] | 285 | ServeOperation(OperationArgs *args); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 286 | |
| 287 | static bool |
| 288 | DupDescriptor(const char *path, int fd, int flags); |
| 289 | |
| 290 | static bool |
| 291 | MonitorCallback(void *callback_baton, |
Peter Collingbourne | 2c67b9a | 2011-11-21 00:10:19 +0000 | [diff] [blame] | 292 | lldb::pid_t pid, bool exited, int signal, int status); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 293 | |
| 294 | static ProcessMessage |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 295 | MonitorSIGTRAP(ProcessMonitor *monitor, |
Greg Clayton | 2804135 | 2011-11-29 20:50:10 +0000 | [diff] [blame] | 296 | const siginfo_t *info, lldb::pid_t pid); |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 297 | |
| 298 | static ProcessMessage |
| 299 | MonitorSignal(ProcessMonitor *monitor, |
Greg Clayton | 2804135 | 2011-11-29 20:50:10 +0000 | [diff] [blame] | 300 | const siginfo_t *info, lldb::pid_t pid); |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 301 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 302 | void |
| 303 | DoOperation(Operation *op); |
Stephen Wilson | 9212d7f | 2011-01-04 21:40:25 +0000 | [diff] [blame] | 304 | |
| 305 | /// Stops the child monitor thread. |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 306 | void |
| 307 | StopMonitoringChildProcess(); |
| 308 | |
Greg Clayton | 743ecf4 | 2012-10-16 20:20:18 +0000 | [diff] [blame] | 309 | /// Stops the operation thread used to attach/launch a process. |
| 310 | void |
| 311 | StopOpThread(); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 312 | }; |
| 313 | |
| 314 | #endif // #ifndef liblldb_ProcessMonitor_H_ |