diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-09-06 14:32:30 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-09-06 14:32:30 +0000 |
commit | 027f1c9655391dcb2b0117f931f720211ac933db (patch) | |
tree | 94980f450aa3daec3e1fec217374704ad62cfe45 /include/lldb/Host/common/NativeProcessProtocol.h | |
parent | 5e95aa85bb660d45e9905ef1d7180b2678280660 (diff) |
Vendor import of (stripped) lldb trunk r242221:vendor/lldb/lldb-trunk-r242221
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=287503
svn path=/vendor/lldb/lldb-trunk-r242221/; revision=287504; tag=vendor/lldb/lldb-trunk-r242221
Diffstat (limited to 'include/lldb/Host/common/NativeProcessProtocol.h')
-rw-r--r-- | include/lldb/Host/common/NativeProcessProtocol.h | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/include/lldb/Host/common/NativeProcessProtocol.h b/include/lldb/Host/common/NativeProcessProtocol.h index f6a685aae147..4f0f3a962d32 100644 --- a/include/lldb/Host/common/NativeProcessProtocol.h +++ b/include/lldb/Host/common/NativeProcessProtocol.h @@ -35,8 +35,6 @@ namespace lldb_private friend class SoftwareBreakpoint; public: - static NativeProcessProtocol * - CreateInstance (lldb::pid_t pid); // lldb_private::Host calls should be used to launch a process for debugging, and // then the process should be attached to. When attaching to a process @@ -44,7 +42,6 @@ namespace lldb_private // and then this function should be called. NativeProcessProtocol (lldb::pid_t pid); - public: virtual ~NativeProcessProtocol () { } @@ -297,6 +294,62 @@ namespace lldb_private virtual Error GetFileLoadAddress(const llvm::StringRef& file_name, lldb::addr_t& load_addr) = 0; + //------------------------------------------------------------------ + /// Launch a process for debugging. This method will create an concrete + /// instance of NativeProcessProtocol, based on the host platform. + /// (e.g. NativeProcessLinux on linux, etc.) + /// + /// @param[in] launch_info + /// Information required to launch the process. + /// + /// @param[in] native_delegate + /// The delegate that will receive messages regarding the + /// inferior. Must outlive the NativeProcessProtocol + /// instance. + /// + /// @param[out] process_sp + /// On successful return from the method, this parameter + /// contains the shared pointer to the + /// NativeProcessProtocol that can be used to manipulate + /// the native process. + /// + /// @return + /// An error object indicating if the operation succeeded, + /// and if not, what error occurred. + //------------------------------------------------------------------ + static Error + Launch (ProcessLaunchInfo &launch_info, + NativeDelegate &native_delegate, + NativeProcessProtocolSP &process_sp); + + //------------------------------------------------------------------ + /// Attach to an existing process. This method will create an concrete + /// instance of NativeProcessProtocol, based on the host platform. + /// (e.g. NativeProcessLinux on linux, etc.) + /// + /// @param[in] pid + /// pid of the process locatable + /// + /// @param[in] native_delegate + /// The delegate that will receive messages regarding the + /// inferior. Must outlive the NativeProcessProtocol + /// instance. + /// + /// @param[out] process_sp + /// On successful return from the method, this parameter + /// contains the shared pointer to the + /// NativeProcessProtocol that can be used to manipulate + /// the native process. + /// + /// @return + /// An error object indicating if the operation succeeded, + /// and if not, what error occurred. + //------------------------------------------------------------------ + static Error + Attach (lldb::pid_t pid, + NativeDelegate &native_delegate, + NativeProcessProtocolSP &process_sp); + protected: lldb::pid_t m_pid; |