diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /source/Plugins/Process/Linux/NativeProcessLinux.h | |
parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) | |
download | src-f3fbd1c0586ff6ec7895991e6c28f61a503c36a8.tar.gz src-f3fbd1c0586ff6ec7895991e6c28f61a503c36a8.zip |
Vendor import of lldb release_39 branch r276489:vendor/lldb/lldb-release_39-r276489
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=303241
svn path=/vendor/lldb/lldb-release_39-r276489/; revision=303242; tag=vendor/lldb/lldb-release_39-r276489
Diffstat (limited to 'source/Plugins/Process/Linux/NativeProcessLinux.h')
-rw-r--r-- | source/Plugins/Process/Linux/NativeProcessLinux.h | 69 |
1 files changed, 8 insertions, 61 deletions
diff --git a/source/Plugins/Process/Linux/NativeProcessLinux.h b/source/Plugins/Process/Linux/NativeProcessLinux.h index 7bac1dc8dbb7..d5be06f0cb58 100644 --- a/source/Plugins/Process/Linux/NativeProcessLinux.h +++ b/source/Plugins/Process/Linux/NativeProcessLinux.h @@ -19,7 +19,6 @@ #include "lldb/Host/Debug.h" #include "lldb/Host/FileSpec.h" #include "lldb/Host/HostThread.h" -#include "lldb/Host/Mutex.h" #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/Host/common/NativeProcessProtocol.h" @@ -27,7 +26,6 @@ namespace lldb_private { class Error; - class Module; class Scalar; namespace process_linux { @@ -127,6 +125,9 @@ namespace process_linux { size_t data_size = 0, long *result = nullptr); + bool + SupportHardwareSingleStepping() const; + protected: // --------------------------------------------------------------------- // NativeProcessProtocol protected interface @@ -141,7 +142,6 @@ namespace process_linux { LazyBool m_supports_mem_region; std::vector<MemoryRegionInfo> m_mem_region_cache; - Mutex m_mem_region_cache_mutex; lldb::tid_t m_pending_notification_tid; @@ -149,54 +149,14 @@ namespace process_linux { // the relevan breakpoint std::map<lldb::tid_t, lldb::addr_t> m_threads_stepping_with_breakpoint; - /// @class LauchArgs - /// - /// @brief Simple structure to pass data to the thread responsible for - /// launching a child process. - struct LaunchArgs - { - LaunchArgs(Module *module, - char const **argv, - char const **envp, - const FileSpec &stdin_file_spec, - const FileSpec &stdout_file_spec, - const FileSpec &stderr_file_spec, - const FileSpec &working_dir, - const ProcessLaunchInfo &launch_info); - - ~LaunchArgs(); - - Module *m_module; // The executable image to launch. - char const **m_argv; // Process arguments. - char const **m_envp; // Process environment. - const FileSpec m_stdin_file_spec; // Redirect stdin if not empty. - const FileSpec m_stdout_file_spec; // Redirect stdout if not empty. - const FileSpec m_stderr_file_spec; // Redirect stderr if not empty. - const FileSpec m_working_dir; // Working directory or empty. - const ProcessLaunchInfo &m_launch_info; - }; - - typedef std::function< ::pid_t(Error &)> InitialOperation; // --------------------------------------------------------------------- // Private Instance Methods // --------------------------------------------------------------------- NativeProcessLinux (); - /// Launches an inferior process ready for debugging. Forms the - /// implementation of Process::DoLaunch. - void - LaunchInferior ( - MainLoop &mainloop, - Module *module, - char const *argv[], - char const *envp[], - const FileSpec &stdin_file_spec, - const FileSpec &stdout_file_spec, - const FileSpec &stderr_file_spec, - const FileSpec &working_dir, - const ProcessLaunchInfo &launch_info, - Error &error); + Error + LaunchInferior(MainLoop &mainloop, ProcessLaunchInfo &launch_info); /// Attaches to an existing process. Forms the /// implementation of Process::DoAttach @@ -204,11 +164,11 @@ namespace process_linux { AttachToInferior (MainLoop &mainloop, lldb::pid_t pid, Error &error); ::pid_t - Launch(LaunchArgs *args, Error &error); - - ::pid_t Attach(lldb::pid_t pid, Error &error); + static void + ChildFunc(const ProcessLaunchInfo &launch_info) LLVM_ATTRIBUTE_NORETURN; + static Error SetDefaultPtraceOpts(const lldb::pid_t); @@ -239,9 +199,6 @@ namespace process_linux { void MonitorSignal(const siginfo_t &info, NativeThreadLinux &thread, bool exited); - bool - SupportHardwareSingleStepping() const; - Error SetupSoftwareSingleStepping(NativeThreadLinux &thread); @@ -285,16 +242,6 @@ namespace process_linux { Error GetEventMessage(lldb::tid_t tid, unsigned long *message); - /// Resumes the given thread. If @p signo is anything but - /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread. - Error - Resume(lldb::tid_t tid, uint32_t signo); - - /// Single steps the given thread. If @p signo is anything but - /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread. - Error - SingleStep(lldb::tid_t tid, uint32_t signo); - void NotifyThreadDeath (lldb::tid_t tid); |