LLDB  mainline
NativeProcessLinux.h
Go to the documentation of this file.
1 //===-- NativeProcessLinux.h ---------------------------------- -*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef liblldb_NativeProcessLinux_H_
10 #define liblldb_NativeProcessLinux_H_
11 
12 #include <csignal>
13 #include <unordered_set>
14 
15 #include "lldb/Host/Debug.h"
16 #include "lldb/Host/HostThread.h"
19 #include "lldb/Utility/ArchSpec.h"
20 #include "lldb/Utility/FileSpec.h"
21 #include "lldb/lldb-types.h"
22 
23 #include "IntelPTManager.h"
24 #include "NativeThreadLinux.h"
27 
28 namespace lldb_private {
29 class Status;
30 class Scalar;
31 
32 namespace process_linux {
33 /// \class NativeProcessLinux
34 /// Manages communication with the inferior (debugee) process.
35 ///
36 /// Upon construction, this class prepares and launches an inferior process
37 /// for debugging.
38 ///
39 /// Changes in the inferior process state are broadcasted.
42 public:
44  public:
45  llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
46  Launch(ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate,
47  MainLoop &mainloop) const override;
48 
49  llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
50  Attach(lldb::pid_t pid, NativeDelegate &native_delegate,
51  MainLoop &mainloop) const override;
52 
53  Extension GetSupportedExtensions() const override;
54  };
55 
56  // NativeProcessProtocol Interface
57  Status Resume(const ResumeActionList &resume_actions) override;
58 
59  Status Halt() override;
60 
61  Status Detach() override;
62 
63  Status Signal(int signo) override;
64 
65  Status Interrupt() override;
66 
67  Status Kill() override;
68 
70  MemoryRegionInfo &range_info) override;
71 
72  Status ReadMemory(lldb::addr_t addr, void *buf, size_t size,
73  size_t &bytes_read) override;
74 
75  Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
76  size_t &bytes_written) override;
77 
78  llvm::Expected<lldb::addr_t> AllocateMemory(size_t size,
79  uint32_t permissions) override;
80 
82 
83  Status ReadMemoryTags(int32_t type, lldb::addr_t addr, size_t len,
84  std::vector<uint8_t> &tags) override;
85 
86  Status WriteMemoryTags(int32_t type, lldb::addr_t addr, size_t len,
87  const std::vector<uint8_t> &tags) override;
88 
89  size_t UpdateThreads() override;
90 
91  const ArchSpec &GetArchitecture() const override { return m_arch; }
92 
94  bool hardware) override;
95 
96  Status RemoveBreakpoint(lldb::addr_t addr, bool hardware = false) override;
97 
98  void DoStopIDBumped(uint32_t newBumpId) override;
99 
100  Status GetLoadedModuleFileSpec(const char *module_path,
101  FileSpec &file_spec) override;
102 
103  Status GetFileLoadAddress(const llvm::StringRef &file_name,
104  lldb::addr_t &load_addr) override;
105 
108 
109  llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
110  GetAuxvData() const override {
111  return getProcFile(GetID(), "auxv");
112  }
113 
114  /// Tracing
115  /// These methods implement the jLLDBTrace packets
116  /// \{
117  llvm::Error TraceStart(llvm::StringRef json_request,
118  llvm::StringRef type) override;
119 
120  llvm::Error TraceStop(const TraceStopRequest &request) override;
121 
122  llvm::Expected<llvm::json::Value>
123  TraceGetState(llvm::StringRef type) override;
124 
125  llvm::Expected<std::vector<uint8_t>>
126  TraceGetBinaryData(const TraceGetBinaryDataRequest &request) override;
127 
128  llvm::Expected<TraceSupportedResponse> TraceSupported() override;
129  /// }
130 
131  // Interface used by NativeRegisterContext-derived classes.
132  static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
133  void *data = nullptr, size_t data_size = 0,
134  long *result = nullptr);
135 
136  bool SupportHardwareSingleStepping() const;
137 
138 protected:
139  llvm::Expected<llvm::ArrayRef<uint8_t>>
140  GetSoftwareBreakpointTrapOpcode(size_t size_hint) override;
141 
142  llvm::Expected<uint64_t> Syscall(llvm::ArrayRef<uint64_t> args);
143 
144 private:
148 
150  std::vector<std::pair<MemoryRegionInfo, FileSpec>> m_mem_region_cache;
151 
153 
154  /// Inferior memory (allocated by us) and its size.
155  llvm::DenseMap<lldb::addr_t, lldb::addr_t> m_allocated_memory;
156 
157  // Private Instance Methods
158  NativeProcessLinux(::pid_t pid, int terminal_fd, NativeDelegate &delegate,
159  const ArchSpec &arch, MainLoop &mainloop,
160  llvm::ArrayRef<::pid_t> tids);
161 
162  // Returns a list of process threads that we have attached to.
163  static llvm::Expected<std::vector<::pid_t>> Attach(::pid_t pid);
164 
166 
167  void MonitorCallback(lldb::pid_t pid, bool exited, WaitStatus status);
168 
169  void WaitForCloneNotification(::pid_t pid);
170 
171  void MonitorSIGTRAP(const siginfo_t &info, NativeThreadLinux &thread);
172 
173  void MonitorTrace(NativeThreadLinux &thread);
174 
175  void MonitorBreakpoint(NativeThreadLinux &thread);
176 
177  void MonitorWatchpoint(NativeThreadLinux &thread, uint32_t wp_index);
178 
179  void MonitorSignal(const siginfo_t &info, NativeThreadLinux &thread,
180  bool exited);
181 
182  bool HasThreadNoLock(lldb::tid_t thread_id);
183 
184  bool StopTrackingThread(lldb::tid_t thread_id);
185 
186  /// Create a new thread.
187  ///
188  /// If process tracing is enabled and the thread can't be traced, then the
189  /// thread is left stopped with a \a eStopReasonProcessorTrace status, and
190  /// then the process is stopped.
191  ///
192  /// \param[in] resume
193  /// If a tracing error didn't happen, then resume the thread after
194  /// creation if \b true, or leave it stopped with SIGSTOP if \b false.
195  NativeThreadLinux &AddThread(lldb::tid_t thread_id, bool resume);
196 
197  /// Start tracing a new thread if process tracing is enabled.
198  ///
199  /// Trace mechanisms should modify this method to provide automatic tracing
200  /// for new threads.
202 
203  /// Stop tracing threads upon a destroy event.
204  ///
205  /// Trace mechanisms should modify this method to provide automatic trace
206  /// stopping for threads being destroyed.
208 
209  /// Writes a siginfo_t structure corresponding to the given thread ID to the
210  /// memory region pointed to by \p siginfo.
211  Status GetSignalInfo(lldb::tid_t tid, void *siginfo);
212 
213  /// Writes the raw event message code (vis-a-vis PTRACE_GETEVENTMSG)
214  /// corresponding to the given thread ID to the memory pointed to by @p
215  /// message.
216  Status GetEventMessage(lldb::tid_t tid, unsigned long *message);
217 
218  void NotifyThreadDeath(lldb::tid_t tid);
219 
221 
222  // This method is requests a stop on all threads which are still running. It
223  // sets up a
224  // deferred delegate notification, which will fire once threads report as
225  // stopped. The
226  // triggerring_tid will be set as the current thread (main stop reason).
227  void StopRunningThreads(lldb::tid_t triggering_tid);
228 
229  // Notify the delegate if all threads have stopped.
231 
232  // Resume the given thread, optionally passing it the given signal. The type
233  // of resume
234  // operation (continue, single-step) depends on the state parameter.
236  int signo);
237 
238  void ThreadWasCreated(NativeThreadLinux &thread);
239 
240  void SigchldHandler();
241 
243 
244  /// Manages Intel PT process and thread traces.
246 
247  struct CloneInfo {
248  int event;
250  };
251 
252  // Map of child processes that have been signaled once, and we are
253  // waiting for the second signal.
254  llvm::DenseMap<lldb::pid_t, llvm::Optional<CloneInfo>> m_pending_pid_map;
255 
256  // Handle a clone()-like event. If received by parent, clone_info contains
257  // additional info. Returns true if the event is handled, or false if it
258  // is pending second notification.
259  bool MonitorClone(lldb::pid_t child_pid,
260  llvm::Optional<CloneInfo> clone_info);
261 };
262 
263 } // namespace process_linux
264 } // namespace lldb_private
265 
266 #endif // #ifndef liblldb_NativeProcessLinux_H_
lldb_private::NativeProcessProtocol::NativeDelegate
Definition: NativeProcessProtocol.h:221
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::TraceGetBinaryDataRequest
jLLDBTraceGetBinaryData gdb-remote packet
Definition: TraceGDBRemotePackets.h:132
lldb_private::process_linux::NativeProcessLinux::PtraceWrapper
static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr=nullptr, void *data=nullptr, size_t data_size=0, long *result=nullptr)
}
Definition: NativeProcessLinux.cpp:1980
lldb_private::process_linux::NativeProcessLinux::MonitorSIGTRAP
void MonitorSIGTRAP(const siginfo_t &info, NativeThreadLinux &thread)
Definition: NativeProcessLinux.cpp:578
lldb_private::process_linux::NativeProcessLinux::GetThreadByID
NativeThreadLinux * GetThreadByID(lldb::tid_t id)
Definition: NativeProcessLinux.cpp:1837
lldb_private::process_linux::NativeProcessLinux::m_pending_notification_tid
lldb::tid_t m_pending_notification_tid
Definition: NativeProcessLinux.h:152
lldb_private::process_linux::NativeProcessLinux::DoStopIDBumped
void DoStopIDBumped(uint32_t newBumpId) override
Definition: NativeProcessLinux.cpp:1294
lldb_private::process_linux::NativeProcessLinux::GetEventMessage
Status GetEventMessage(lldb::tid_t tid, unsigned long *message)
Writes the raw event message code (vis-a-vis PTRACE_GETEVENTMSG) corresponding to the given thread ID...
Definition: NativeProcessLinux.cpp:1708
lldb_private::process_linux::NativeProcessLinux::GetSignalInfo
Status GetSignalInfo(lldb::tid_t tid, void *siginfo)
Writes a siginfo_t structure corresponding to the given thread ID to the memory region pointed to by ...
Definition: NativeProcessLinux.cpp:1704
lldb_private::process_linux::NativeProcessLinux::MonitorSignal
void MonitorSignal(const siginfo_t &info, NativeThreadLinux &thread, bool exited)
Definition: NativeProcessLinux.cpp:803
lldb_private::process_linux::NativeProcessLinux::NativeProcessLinux
NativeProcessLinux(::pid_t pid, int terminal_fd, NativeDelegate &delegate, const ArchSpec &arch, MainLoop &mainloop, llvm::ArrayRef<::pid_t > tids)
Definition: NativeProcessLinux.cpp:308
lldb_private::process_linux::NativeProcessLinux::MonitorTrace
void MonitorTrace(NativeThreadLinux &thread)
Definition: NativeProcessLinux.cpp:761
lldb_private::process_linux::NativeThreadLinux
Definition: NativeThreadLinux.h:29
lldb_private::MemoryRegionInfo
Definition: MemoryRegionInfo.h:21
lldb_private::process_linux::NativeProcessLinux::PopulateMemoryRegionCache
Status PopulateMemoryRegionCache()
Definition: NativeProcessLinux.cpp:1231
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::LazyBool
LazyBool
Definition: lldb-private-enumerations.h:115
lldb_private::process_linux::IntelPTManager
Main class that manages intel-pt process and thread tracing.
Definition: IntelPTManager.h:206
NativeThreadLinux.h
lldb_private::process_linux::NativeProcessLinux::MonitorCallback
void MonitorCallback(lldb::pid_t pid, bool exited, WaitStatus status)
Definition: NativeProcessLinux.cpp:429
lldb_private::process_linux::NativeProcessLinux::GetAuxvData
llvm::ErrorOr< std::unique_ptr< llvm::MemoryBuffer > > GetAuxvData() const override
Definition: NativeProcessLinux.h:110
lldb_private::process_linux::NativeProcessLinux::Factory::Launch
llvm::Expected< std::unique_ptr< NativeProcessProtocol > > Launch(ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate, MainLoop &mainloop) const override
Launch a process for debugging.
Definition: NativeProcessLinux.cpp:218
lldb_private::process_linux::NativeProcessLinux::Resume
Status Resume(const ResumeActionList &resume_actions) override
Definition: NativeProcessLinux.cpp:975
lldb_private::process_linux::NativeProcessLinux::CloneInfo::event
int event
Definition: NativeProcessLinux.h:248
lldb_private::process_linux::NativeProcessLinux::ThreadWasCreated
void ThreadWasCreated(NativeThreadLinux &thread)
Definition: NativeProcessLinux.cpp:1935
lldb_private::process_linux::NativeProcessLinux::UpdateThreads
size_t UpdateThreads() override
Definition: NativeProcessLinux.cpp:1558
lldb_private::WaitStatus
Definition: Host.h:34
lldb_private::process_linux::NativeProcessLinux::WriteMemory
Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size, size_t &bytes_written) override
Definition: NativeProcessLinux.cpp:1658
lldb_private::process_linux::NativeProcessLinux::m_pending_pid_map
llvm::DenseMap< lldb::pid_t, llvm::Optional< CloneInfo > > m_pending_pid_map
Definition: NativeProcessLinux.h:254
lldb_private::process_linux::NativeProcessLinux::HasThreadNoLock
bool HasThreadNoLock(lldb::tid_t thread_id)
Definition: NativeProcessLinux.cpp:1720
lldb_private::process_linux::NativeProcessLinux::MonitorBreakpoint
void MonitorBreakpoint(NativeThreadLinux &thread)
Definition: NativeProcessLinux.cpp:771
lldb_private::process_linux::NativeProcessLinux::TraceSupported
llvm::Expected< TraceSupportedResponse > TraceSupported() override
Get the processor tracing type supported for this process.
Definition: NativeProcessLinux.cpp:2015
lldb_private::process_linux::NativeProcessLinux::SetBreakpoint
Status SetBreakpoint(lldb::addr_t addr, uint32_t size, bool hardware) override
Definition: NativeProcessLinux.cpp:1565
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::process_linux::NativeProcessLinux::WaitForCloneNotification
void WaitForCloneNotification(::pid_t pid)
Definition: NativeProcessLinux.cpp:542
HostThread.h
lldb_private::process_linux::NativeProcessLinux::GetSoftwareBreakpointTrapOpcode
llvm::Expected< llvm::ArrayRef< uint8_t > > GetSoftwareBreakpointTrapOpcode(size_t size_hint) override
Definition: NativeProcessLinux.cpp:1581
lldb_private::process_linux::NativeProcessLinux::AddThread
NativeThreadLinux & AddThread(lldb::tid_t thread_id, bool resume)
Create a new thread.
Definition: NativeProcessLinux.cpp:1772
lldb_private::process_linux::NativeProcessLinux::SupportHardwareSingleStepping
bool SupportHardwareSingleStepping() const
Definition: NativeProcessLinux.cpp:969
lldb_private::NativeProcessSoftwareSingleStep
Definition: NativeProcessSoftwareSingleStep.h:19
lldb_private::ProcessLaunchInfo
Definition: ProcessLaunchInfo.h:31
lldb_private::process_linux::NativeProcessLinux::NotifyTracersOfThreadDestroyed
Status NotifyTracersOfThreadDestroyed(lldb::tid_t tid)
Stop tracing threads upon a destroy event.
Definition: NativeProcessLinux.cpp:1762
MemoryRegionInfo.h
lldb_private::process_linux::NativeProcessLinux::TraceGetBinaryData
llvm::Expected< std::vector< uint8_t > > TraceGetBinaryData(const TraceGetBinaryDataRequest &request) override
Get binary data given a trace technology and a data identifier.
Definition: NativeProcessLinux.cpp:2049
lldb_private::process_linux::NativeProcessLinux::GetFileLoadAddress
Status GetFileLoadAddress(const llvm::StringRef &file_name, lldb::addr_t &load_addr) override
Definition: NativeProcessLinux.cpp:1820
lldb_private::process_linux::NativeProcessLinux::CloneInfo::parent_tid
lldb::tid_t parent_tid
Definition: NativeProcessLinux.h:249
lldb_private::process_linux::NativeProcessLinux::Factory::Attach
llvm::Expected< std::unique_ptr< NativeProcessProtocol > > Attach(lldb::pid_t pid, NativeDelegate &native_delegate, MainLoop &mainloop) const override
Attach to an existing process.
Definition: NativeProcessLinux.cpp:270
lldb_private::process_linux::NativeProcessLinux::NotifyTracersOfNewThread
Status NotifyTracersOfNewThread(lldb::tid_t tid)
Start tracing a new thread if process tracing is enabled.
Definition: NativeProcessLinux.cpp:1753
lldb_private::process_linux::NativeProcessLinux::Factory::GetSupportedExtensions
Extension GetSupportedExtensions() const override
Get the bitmask of extensions supported by this process plugin.
Definition: NativeProcessLinux.cpp:292
lldb_private::NativeProcessProtocol::GetID
lldb::pid_t GetID() const
Definition: NativeProcessProtocol.h:172
NativeProcessELF.h
lldb_private::process_linux::NativeProcessLinux::ResumeThread
Status ResumeThread(NativeThreadLinux &thread, lldb::StateType state, int signo)
Definition: NativeProcessLinux.cpp:1847
lldb_private::process_linux::NativeProcessLinux
Definition: NativeProcessLinux.h:40
lldb_private::process_linux::NativeProcessLinux::GetLoadedModuleFileSpec
Status GetLoadedModuleFileSpec(const char *module_path, FileSpec &file_spec) override
Definition: NativeProcessLinux.cpp:1800
lldb_private::process_linux::NativeProcessLinux::TraceStart
llvm::Error TraceStart(llvm::StringRef json_request, llvm::StringRef type) override
Tracing These methods implement the jLLDBTrace packets.
Definition: NativeProcessLinux.cpp:2021
lldb_private::getProcFile
llvm::ErrorOr< std::unique_ptr< llvm::MemoryBuffer > > getProcFile(::pid_t pid, ::pid_t tid, const llvm::Twine &file)
Definition: Support.cpp:14
lldb_private::process_linux::NativeProcessLinux::TraceGetState
llvm::Expected< llvm::json::Value > TraceGetState(llvm::StringRef type) override
Get the current tracing state of the process and its threads.
Definition: NativeProcessLinux.cpp:2043
lldb_private::process_linux::NativeProcessLinux::m_sigchld_handle
MainLoop::SignalHandleUP m_sigchld_handle
Definition: NativeProcessLinux.h:145
lldb_private::process_linux::NativeProcessLinux::Kill
Status Kill() override
Definition: NativeProcessLinux.cpp:1126
lldb_private::process_linux::NativeProcessLinux::WriteMemoryTags
Status WriteMemoryTags(int32_t type, lldb::addr_t addr, size_t len, const std::vector< uint8_t > &tags) override
Definition: NativeProcessLinux.cpp:1487
lldb_private::process_linux::NativeProcessLinux::SigchldHandler
void SigchldHandler()
Definition: NativeProcessLinux.cpp:1947
lldb_private::process_linux::NativeProcessLinux::Interrupt
Status Interrupt() override
Tells a process to interrupt all operations as if by a Ctrl-C.
Definition: NativeProcessLinux.cpp:1083
lldb_private::process_linux::NativeProcessLinux::CloneInfo
Definition: NativeProcessLinux.h:247
lldb_private::NativeProcessProtocol::Extension
Extension
Extension flag constants, returned by Factory::GetSupportedExtensions() and passed to SetEnabledExten...
Definition: NativeProcessProtocol.h:245
lldb-types.h
lldb_private::process_linux::NativeProcessLinux::Attach
static llvm::Expected< std::vector<::pid_t > > Attach(::pid_t pid)
Definition: NativeProcessLinux.cpp:337
lldb_private::process_linux::NativeProcessLinux::Detach
Status Detach() override
Definition: NativeProcessLinux.cpp:1048
lldb_private::process_linux::NativeProcessLinux::MonitorWatchpoint
void MonitorWatchpoint(NativeThreadLinux &thread, uint32_t wp_index)
Definition: NativeProcessLinux.cpp:787
lldb_private::TraceStopRequest
jLLDBTraceStop gdb-remote packet
Definition: TraceGDBRemotePackets.h:62
lldb_private::process_linux::NativeProcessLinux::m_supports_mem_region
LazyBool m_supports_mem_region
Definition: NativeProcessLinux.h:149
IntelPTManager.h
lldb_private::Status
Definition: Status.h:44
lldb_private::process_linux::NativeProcessLinux::GetCurrentThread
NativeThreadLinux * GetCurrentThread()
Definition: NativeProcessLinux.cpp:1842
lldb_private::process_linux::NativeProcessLinux::StopTrackingThread
bool StopTrackingThread(lldb::tid_t thread_id)
Definition: NativeProcessLinux.cpp:1733
message
message(FATAL_ERROR "invalid libipt include path provided") endif() include_directories($
Definition: Plugins/Trace/intel-pt/CMakeLists.txt:6
uint32_t
lldb_private::process_linux::NativeProcessLinux::Signal
Status Signal(int signo) override
Sends a process a UNIX signal signal.
Definition: NativeProcessLinux.cpp:1070
lldb_private::process_linux::NativeProcessLinux::m_main_loop
MainLoop & m_main_loop
Definition: NativeProcessLinux.h:147
lldb_private::MainLoop
Definition: MainLoop.h:38
lldb_private::process_linux::NativeProcessLinux::AllocateMemory
llvm::Expected< lldb::addr_t > AllocateMemory(size_t size, uint32_t permissions) override
Definition: NativeProcessLinux.cpp:1386
lldb::pid_t
uint64_t pid_t
Definition: lldb-types.h:85
Support.h
lldb_private::MainLoop::SignalHandleUP
std::unique_ptr< SignalHandle > SignalHandleUP
Definition: MainLoop.h:40
ArchSpec.h
lldb_private::process_linux::NativeProcessLinux::StopRunningThreads
void StopRunningThreads(lldb::tid_t triggering_tid)
Definition: NativeProcessLinux.cpp:1888
lldb_private::process_linux::NativeProcessLinux::m_arch
ArchSpec m_arch
Definition: NativeProcessLinux.h:146
lldb_private::process_linux::NativeProcessLinux::SignalIfAllThreadsStopped
void SignalIfAllThreadsStopped()
Definition: NativeProcessLinux.cpp:1906
lldb_private::process_linux::NativeProcessLinux::m_intel_pt_manager
IntelPTManager m_intel_pt_manager
Manages Intel PT process and thread traces.
Definition: NativeProcessLinux.h:245
lldb_private::ResumeActionList
Definition: Debug.h:33
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::NativeProcessELF
Definition: NativeProcessELF.h:21
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
Error
llvm::Error Error
Definition: UdtRecordCompleter.cpp:29
FileSpec.h
lldb_private::process_linux::NativeProcessLinux::TraceStop
llvm::Error TraceStop(const TraceStopRequest &request) override
Stop tracing a live process or its threads.
Definition: NativeProcessLinux.cpp:2037
lldb_private::process_linux::NativeProcessLinux::Halt
Status Halt() override
Definition: NativeProcessLinux.cpp:1039
lldb_private::process_linux::NativeProcessLinux::m_mem_region_cache
std::vector< std::pair< MemoryRegionInfo, FileSpec > > m_mem_region_cache
Definition: NativeProcessLinux.h:150
lldb_private::process_linux::NativeProcessLinux::RemoveBreakpoint
Status RemoveBreakpoint(lldb::addr_t addr, bool hardware=false) override
Definition: NativeProcessLinux.cpp:1573
LLDB_INVALID_THREAD_ID
#define LLDB_INVALID_THREAD_ID
Definition: lldb-defines.h:94
lldb_private::process_linux::NativeProcessLinux::Factory
Definition: NativeProcessLinux.h:43
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb_private::process_linux::NativeProcessLinux::Syscall
llvm::Expected< uint64_t > Syscall(llvm::ArrayRef< uint64_t > args)
Definition: NativeProcessLinux.cpp:1303
lldb_private::process_linux::NativeProcessLinux::NotifyThreadDeath
void NotifyThreadDeath(lldb::tid_t tid)
lldb_private::process_linux::NativeProcessLinux::ReadMemory
Status ReadMemory(lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) override
Definition: NativeProcessLinux.cpp:1603
lldb_private::process_linux::NativeProcessLinux::MonitorClone
bool MonitorClone(lldb::pid_t child_pid, llvm::Optional< CloneInfo > clone_info)
Definition: NativeProcessLinux.cpp:890
lldb_private::process_linux::NativeProcessLinux::DeallocateMemory
llvm::Error DeallocateMemory(lldb::addr_t addr) override
Definition: NativeProcessLinux.cpp:1412
lldb_private::process_linux::NativeProcessLinux::m_allocated_memory
llvm::DenseMap< lldb::addr_t, lldb::addr_t > m_allocated_memory
Inferior memory (allocated by us) and its size.
Definition: NativeProcessLinux.h:155
NativeProcessSoftwareSingleStep.h
lldb_private::LineStatus::Status
@ Status
lldb_private::NativeProcessProtocol::Factory
Definition: NativeProcessProtocol.h:258
Debug.h
lldb_private::process_linux::NativeProcessLinux::SetDefaultPtraceOpts
static Status SetDefaultPtraceOpts(const lldb::pid_t)
Definition: NativeProcessLinux.cpp:401
lldb::tid_t
uint64_t tid_t
Definition: lldb-types.h:86
lldb_private::process_linux::NativeProcessLinux::GetArchitecture
const ArchSpec & GetArchitecture() const override
Definition: NativeProcessLinux.h:91
lldb_private::process_linux::NativeProcessLinux::ReadMemoryTags
Status ReadMemoryTags(int32_t type, lldb::addr_t addr, size_t len, std::vector< uint8_t > &tags) override
Definition: NativeProcessLinux.cpp:1432
lldb_private::process_linux::NativeProcessLinux::GetMemoryRegionInfo
Status GetMemoryRegionInfo(lldb::addr_t load_addr, MemoryRegionInfo &range_info) override
Definition: NativeProcessLinux.cpp:1162