Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 1 | //===-- NativeProcessLinux.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_NativeProcessLinux_H_ |
| 11 | #define liblldb_NativeProcessLinux_H_ |
| 12 | |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 13 | // C++ Includes |
| 14 | #include <unordered_set> |
| 15 | |
| 16 | // Other libraries and framework includes |
| 17 | #include "lldb/Core/ArchSpec.h" |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 18 | #include "lldb/Host/Debug.h" |
Zachary Turner | 39de311 | 2014-09-09 20:54:56 +0000 | [diff] [blame] | 19 | #include "lldb/Host/HostThread.h" |
Pavel Labath | b7f0f45 | 2017-03-17 11:08:40 +0000 | [diff] [blame] | 20 | #include "lldb/Host/linux/Support.h" |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 21 | #include "lldb/Target/MemoryRegionInfo.h" |
Zachary Turner | 5713a05 | 2017-03-22 18:40:07 +0000 | [diff] [blame] | 22 | #include "lldb/Utility/FileSpec.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 23 | #include "lldb/lldb-types.h" |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 24 | |
Pavel Labath | 8c8ff7a | 2015-05-11 10:03:10 +0000 | [diff] [blame] | 25 | #include "NativeThreadLinux.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 26 | #include "lldb/Host/common/NativeProcessProtocol.h" |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 27 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 28 | namespace lldb_private { |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 29 | class Status; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 30 | class Scalar; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 31 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 32 | namespace process_linux { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 33 | /// @class NativeProcessLinux |
| 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 broadcasted. |
| 40 | class NativeProcessLinux : public NativeProcessProtocol { |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 41 | friend Status NativeProcessProtocol::Launch( |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 42 | ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate, |
| 43 | MainLoop &mainloop, NativeProcessProtocolSP &process_sp); |
Pavel Labath | d5b310f | 2015-07-09 11:51:11 +0000 | [diff] [blame] | 44 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 45 | friend Status NativeProcessProtocol::Attach( |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 46 | lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate, |
| 47 | MainLoop &mainloop, NativeProcessProtocolSP &process_sp); |
Pavel Labath | d5b310f | 2015-07-09 11:51:11 +0000 | [diff] [blame] | 48 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 49 | public: |
| 50 | // --------------------------------------------------------------------- |
| 51 | // NativeProcessProtocol Interface |
| 52 | // --------------------------------------------------------------------- |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 53 | Status Resume(const ResumeActionList &resume_actions) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 54 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 55 | Status Halt() override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 56 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 57 | Status Detach() override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 58 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 59 | Status Signal(int signo) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 60 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 61 | Status Interrupt() override; |
Chaoren Lin | e9547b8 | 2015-02-03 01:51:00 +0000 | [diff] [blame] | 62 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 63 | Status Kill() override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 64 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 65 | Status GetMemoryRegionInfo(lldb::addr_t load_addr, |
| 66 | MemoryRegionInfo &range_info) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 67 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 68 | Status ReadMemory(lldb::addr_t addr, void *buf, size_t size, |
| 69 | size_t &bytes_read) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 70 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 71 | Status ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size, |
| 72 | size_t &bytes_read) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 73 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 74 | Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size, |
| 75 | size_t &bytes_written) override; |
Chaoren Lin | 3eb4b45 | 2015-04-29 17:24:48 +0000 | [diff] [blame] | 76 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 77 | Status AllocateMemory(size_t size, uint32_t permissions, |
| 78 | lldb::addr_t &addr) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 79 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 80 | Status DeallocateMemory(lldb::addr_t addr) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 81 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 82 | lldb::addr_t GetSharedLibraryInfoAddress() override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 83 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 84 | size_t UpdateThreads() override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 85 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 86 | bool GetArchitecture(ArchSpec &arch) const override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 87 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 88 | Status SetBreakpoint(lldb::addr_t addr, uint32_t size, |
| 89 | bool hardware) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 90 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 91 | Status RemoveBreakpoint(lldb::addr_t addr, bool hardware = false) override; |
Omair Javaid | d5ffbad | 2017-02-24 13:27:31 +0000 | [diff] [blame] | 92 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 93 | void DoStopIDBumped(uint32_t newBumpId) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 94 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 95 | Status GetLoadedModuleFileSpec(const char *module_path, |
| 96 | FileSpec &file_spec) override; |
Tamas Berghammer | 068f8a7 | 2015-05-26 11:58:52 +0000 | [diff] [blame] | 97 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 98 | Status GetFileLoadAddress(const llvm::StringRef &file_name, |
| 99 | lldb::addr_t &load_addr) override; |
Tamas Berghammer | 783bfc8 | 2015-06-18 20:43:56 +0000 | [diff] [blame] | 100 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 101 | NativeThreadLinuxSP GetThreadByID(lldb::tid_t id); |
Pavel Labath | f907778 | 2015-08-21 09:13:53 +0000 | [diff] [blame] | 102 | |
Pavel Labath | b7f0f45 | 2017-03-17 11:08:40 +0000 | [diff] [blame] | 103 | llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> |
| 104 | GetAuxvData() const override { |
| 105 | return getProcFile(GetID(), "auxv"); |
| 106 | } |
| 107 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 108 | // --------------------------------------------------------------------- |
| 109 | // Interface used by NativeRegisterContext-derived classes. |
| 110 | // --------------------------------------------------------------------- |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 111 | static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr, |
| 112 | void *data = nullptr, size_t data_size = 0, |
| 113 | long *result = nullptr); |
Tamas Berghammer | 7cb18bf | 2015-03-24 11:15:23 +0000 | [diff] [blame] | 114 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 115 | bool SupportHardwareSingleStepping() const; |
Pavel Labath | 605b51b | 2016-02-23 13:56:30 +0000 | [diff] [blame] | 116 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 117 | protected: |
| 118 | // --------------------------------------------------------------------- |
| 119 | // NativeProcessProtocol protected interface |
| 120 | // --------------------------------------------------------------------- |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 121 | Status |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 122 | GetSoftwareBreakpointTrapOpcode(size_t trap_opcode_size_hint, |
| 123 | size_t &actual_opcode_size, |
| 124 | const uint8_t *&trap_opcode_bytes) override; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 125 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 126 | private: |
| 127 | MainLoop::SignalHandleUP m_sigchld_handle; |
| 128 | ArchSpec m_arch; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 129 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 130 | LazyBool m_supports_mem_region; |
Tamas Berghammer | a6f5795 | 2017-01-03 16:29:43 +0000 | [diff] [blame] | 131 | std::vector<std::pair<MemoryRegionInfo, FileSpec>> m_mem_region_cache; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 132 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 133 | lldb::tid_t m_pending_notification_tid; |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 134 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 135 | // List of thread ids stepping with a breakpoint with the address of |
| 136 | // the relevan breakpoint |
| 137 | std::map<lldb::tid_t, lldb::addr_t> m_threads_stepping_with_breakpoint; |
Pavel Labath | 0e1d729 | 2015-08-20 09:06:12 +0000 | [diff] [blame] | 138 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 139 | // --------------------------------------------------------------------- |
| 140 | // Private Instance Methods |
| 141 | // --------------------------------------------------------------------- |
| 142 | NativeProcessLinux(); |
Tamas Berghammer | d8c338d | 2015-04-15 09:47:02 +0000 | [diff] [blame] | 143 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 144 | Status LaunchInferior(MainLoop &mainloop, ProcessLaunchInfo &launch_info); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 145 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 146 | /// Attaches to an existing process. Forms the |
| 147 | /// implementation of Process::DoAttach |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 148 | void AttachToInferior(MainLoop &mainloop, lldb::pid_t pid, Status &error); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 149 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 150 | ::pid_t Attach(lldb::pid_t pid, Status &error); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 151 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 152 | static Status SetDefaultPtraceOpts(const lldb::pid_t); |
Pavel Labath | 1107b5a | 2015-04-17 14:07:49 +0000 | [diff] [blame] | 153 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 154 | static void *MonitorThread(void *baton); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 155 | |
Pavel Labath | 3508fc8 | 2017-06-19 12:47:50 +0000 | [diff] [blame^] | 156 | void MonitorCallback(lldb::pid_t pid, bool exited, WaitStatus status); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 157 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 158 | void WaitForNewThread(::pid_t tid); |
Pavel Labath | 1107b5a | 2015-04-17 14:07:49 +0000 | [diff] [blame] | 159 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 160 | void MonitorSIGTRAP(const siginfo_t &info, NativeThreadLinux &thread); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 161 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 162 | void MonitorTrace(NativeThreadLinux &thread); |
Pavel Labath | 426bdf8 | 2015-04-28 07:51:52 +0000 | [diff] [blame] | 163 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 164 | void MonitorBreakpoint(NativeThreadLinux &thread); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 165 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 166 | void MonitorWatchpoint(NativeThreadLinux &thread, uint32_t wp_index); |
Chaoren Lin | c16f5dc | 2015-03-19 23:28:10 +0000 | [diff] [blame] | 167 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 168 | void MonitorSignal(const siginfo_t &info, NativeThreadLinux &thread, |
| 169 | bool exited); |
Chaoren Lin | c16f5dc | 2015-03-19 23:28:10 +0000 | [diff] [blame] | 170 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 171 | Status SetupSoftwareSingleStepping(NativeThreadLinux &thread); |
Tamas Berghammer | e770868 | 2015-04-22 10:00:23 +0000 | [diff] [blame] | 172 | |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 173 | #if 0 |
| 174 | static ::ProcessMessage::CrashReason |
| 175 | GetCrashReasonForSIGSEGV(const siginfo_t *info); |
| 176 | |
| 177 | static ::ProcessMessage::CrashReason |
| 178 | GetCrashReasonForSIGILL(const siginfo_t *info); |
| 179 | |
| 180 | static ::ProcessMessage::CrashReason |
| 181 | GetCrashReasonForSIGFPE(const siginfo_t *info); |
| 182 | |
| 183 | static ::ProcessMessage::CrashReason |
| 184 | GetCrashReasonForSIGBUS(const siginfo_t *info); |
| 185 | #endif |
| 186 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 187 | bool HasThreadNoLock(lldb::tid_t thread_id); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 188 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 189 | bool StopTrackingThread(lldb::tid_t thread_id); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 190 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 191 | NativeThreadLinuxSP AddThread(lldb::tid_t thread_id); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 192 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 193 | Status GetSoftwareBreakpointPCOffset(uint32_t &actual_opcode_size); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 194 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 195 | Status FixupBreakpointPCAsNeeded(NativeThreadLinux &thread); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 196 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 197 | /// Writes a siginfo_t structure corresponding to the given thread ID to the |
| 198 | /// memory region pointed to by @p siginfo. |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 199 | Status GetSignalInfo(lldb::tid_t tid, void *siginfo); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 200 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 201 | /// Writes the raw event message code (vis-a-vis PTRACE_GETEVENTMSG) |
| 202 | /// corresponding to the given thread ID to the memory pointed to by @p |
| 203 | /// message. |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 204 | Status GetEventMessage(lldb::tid_t tid, unsigned long *message); |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 205 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 206 | void NotifyThreadDeath(lldb::tid_t tid); |
Chaoren Lin | fa03ad2 | 2015-02-03 01:50:42 +0000 | [diff] [blame] | 207 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 208 | Status Detach(lldb::tid_t tid); |
Chaoren Lin | 86fd8e4 | 2015-02-03 01:51:15 +0000 | [diff] [blame] | 209 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 210 | // This method is requests a stop on all threads which are still running. It |
| 211 | // sets up a |
| 212 | // deferred delegate notification, which will fire once threads report as |
| 213 | // stopped. The |
| 214 | // triggerring_tid will be set as the current thread (main stop reason). |
| 215 | void StopRunningThreads(lldb::tid_t triggering_tid); |
Pavel Labath | c076559 | 2015-05-06 10:46:34 +0000 | [diff] [blame] | 216 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 217 | // Notify the delegate if all threads have stopped. |
| 218 | void SignalIfAllThreadsStopped(); |
Pavel Labath | c076559 | 2015-05-06 10:46:34 +0000 | [diff] [blame] | 219 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 220 | // Resume the given thread, optionally passing it the given signal. The type |
| 221 | // of resume |
| 222 | // operation (continue, single-step) depends on the state parameter. |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 223 | Status ResumeThread(NativeThreadLinux &thread, lldb::StateType state, |
| 224 | int signo); |
Pavel Labath | c076559 | 2015-05-06 10:46:34 +0000 | [diff] [blame] | 225 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 226 | void ThreadWasCreated(NativeThreadLinux &thread); |
Pavel Labath | c076559 | 2015-05-06 10:46:34 +0000 | [diff] [blame] | 227 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 228 | void SigchldHandler(); |
Tamas Berghammer | a6f5795 | 2017-01-03 16:29:43 +0000 | [diff] [blame] | 229 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 230 | Status PopulateMemoryRegionCache(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 231 | }; |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 232 | |
| 233 | } // namespace process_linux |
| 234 | } // namespace lldb_private |
Todd Fiala | af245d1 | 2014-06-30 21:05:18 +0000 | [diff] [blame] | 235 | |
| 236 | #endif // #ifndef liblldb_NativeProcessLinux_H_ |