Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 1 | //===-- ProcessLinux.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_ProcessLinux_H_ |
| 11 | #define liblldb_ProcessLinux_H_ |
| 12 | |
| 13 | // C Includes |
| 14 | |
| 15 | // C++ Includes |
| 16 | #include <queue> |
| 17 | |
| 18 | // Other libraries and framework includes |
| 19 | #include "lldb/Target/Process.h" |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 20 | #include "LinuxSignals.h" |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 21 | #include "ProcessMessage.h" |
Johnny Chen | 30213ff | 2012-01-05 19:17:38 +0000 | [diff] [blame] | 22 | #include "ProcessPOSIX.h" |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 23 | |
| 24 | class ProcessMonitor; |
| 25 | |
| 26 | class ProcessLinux : |
Johnny Chen | 30213ff | 2012-01-05 19:17:38 +0000 | [diff] [blame] | 27 | public ProcessPOSIX |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 28 | { |
| 29 | public: |
| 30 | //------------------------------------------------------------------ |
| 31 | // Static functions. |
| 32 | //------------------------------------------------------------------ |
Greg Clayton | 0c90ef4 | 2012-02-21 18:40:07 +0000 | [diff] [blame] | 33 | static lldb::ProcessSP |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 34 | CreateInstance(lldb_private::Target& target, |
Greg Clayton | 0c90ef4 | 2012-02-21 18:40:07 +0000 | [diff] [blame] | 35 | lldb_private::Listener &listener, |
| 36 | const lldb_private::FileSpec *); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 37 | |
| 38 | static void |
| 39 | Initialize(); |
| 40 | |
| 41 | static void |
| 42 | Terminate(); |
| 43 | |
Greg Clayton | 57abc5d | 2013-05-10 21:47:16 +0000 | [diff] [blame] | 44 | static lldb_private::ConstString |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 45 | GetPluginNameStatic(); |
| 46 | |
| 47 | static const char * |
| 48 | GetPluginDescriptionStatic(); |
| 49 | |
| 50 | //------------------------------------------------------------------ |
| 51 | // Constructors and destructors |
| 52 | //------------------------------------------------------------------ |
| 53 | ProcessLinux(lldb_private::Target& target, |
| 54 | lldb_private::Listener &listener); |
| 55 | |
Greg Clayton | c3c0b0e | 2012-04-12 19:04:34 +0000 | [diff] [blame] | 56 | virtual bool |
Johnny Chen | 30213ff | 2012-01-05 19:17:38 +0000 | [diff] [blame] | 57 | UpdateThreadList(lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list); |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 58 | //------------------------------------------------------------------ |
| 59 | // PluginInterface protocol |
| 60 | //------------------------------------------------------------------ |
Greg Clayton | 57abc5d | 2013-05-10 21:47:16 +0000 | [diff] [blame] | 61 | virtual lldb_private::ConstString |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 62 | GetPluginName(); |
| 63 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 64 | virtual uint32_t |
| 65 | GetPluginVersion(); |
| 66 | |
| 67 | virtual void |
| 68 | GetPluginCommandHelp(const char *command, lldb_private::Stream *strm); |
| 69 | |
| 70 | virtual lldb_private::Error |
| 71 | ExecutePluginCommand(lldb_private::Args &command, |
| 72 | lldb_private::Stream *strm); |
| 73 | |
| 74 | virtual lldb_private::Log * |
| 75 | EnablePluginLogging(lldb_private::Stream *strm, |
| 76 | lldb_private::Args &command); |
| 77 | |
Matt Kopec | 841a548 | 2013-05-17 22:21:08 +0000 | [diff] [blame] | 78 | //------------------------------------------------------------------ |
| 79 | // Plug-in process overrides |
| 80 | //------------------------------------------------------------------ |
| 81 | virtual lldb_private::UnixSignals & |
| 82 | GetUnixSignals () |
| 83 | { |
| 84 | return m_linux_signals; |
| 85 | } |
| 86 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 87 | private: |
Stephen Wilson | 84ffe70 | 2011-03-30 15:55:52 +0000 | [diff] [blame] | 88 | |
| 89 | /// Linux-specific signal set. |
| 90 | LinuxSignals m_linux_signals; |
| 91 | |
Stephen Wilson | e6f9f66 | 2010-07-24 02:19:04 +0000 | [diff] [blame] | 92 | }; |
| 93 | |
| 94 | #endif // liblldb_MacOSXProcess_H_ |