LLDB mainline
NativeProcessProtocol.h
Go to the documentation of this file.
1//===-- NativeProcessProtocol.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 LLDB_HOST_COMMON_NATIVEPROCESSPROTOCOL_H
10#define LLDB_HOST_COMMON_NATIVEPROCESSPROTOCOL_H
11
15#include "lldb/Host/Host.h"
16#include "lldb/Host/MainLoop.h"
20#include "lldb/Utility/Status.h"
24#include "lldb/lldb-types.h"
25#include "llvm/ADT/ArrayRef.h"
26#include "llvm/ADT/DenseSet.h"
27#include "llvm/ADT/StringRef.h"
28#include "llvm/Support/Error.h"
29#include "llvm/Support/MemoryBuffer.h"
30#include <map>
31#include <mutex>
32#include <optional>
33#include <vector>
34
35namespace lldb_private {
37
40
48
49/// Generic loaded-library entry used by the non-SVR4 `qXfer:libraries:read`
50/// form of the GDB remote library-list protocol (PE on Windows).
55
56// NativeProcessProtocol
58public:
59 virtual ~NativeProcessProtocol() = default;
60
61 typedef std::vector<std::unique_ptr<NativeThreadProtocol>> thread_collection;
63 std::recursive_mutex, thread_collection,
64 llvm::pointee_iterator<thread_collection::const_iterator>>
66
67 virtual Status Resume(const ResumeActionList &resume_actions) = 0;
68
69 virtual Status Halt() = 0;
70
71 virtual Status Detach() = 0;
72
73 /// Sends a process a UNIX signal \a signal.
74 ///
75 /// \return
76 /// Returns an error object.
77 virtual Status Signal(int signo) = 0;
78
79 /// Tells a process to interrupt all operations as if by a Ctrl-C.
80 ///
81 /// The default implementation will send a local host's equivalent of
82 /// a SIGSTOP to the process via the NativeProcessProtocol::Signal()
83 /// operation.
84 ///
85 /// \return
86 /// Returns an error object.
87 virtual Status Interrupt();
88
89 virtual Status Kill() = 0;
90
91 // Tells a process not to stop the inferior on given signals and just
92 // reinject them back.
93 virtual Status IgnoreSignals(llvm::ArrayRef<int> signals);
94
95 // Memory and memory region functions
96
97 virtual Status GetMemoryRegionInfo(lldb::addr_t load_addr,
98 MemoryRegionInfo &range_info);
99
100 virtual Status ReadMemory(const ProcessAddress &addr, void *buf, size_t size,
101 size_t &bytes_read) = 0;
102
103 Status ReadMemoryWithoutTrap(const ProcessAddress &addr, void *buf,
104 size_t size, size_t &bytes_read);
105
106 virtual Status ReadMemoryTags(int32_t type, lldb::addr_t addr, size_t len,
107 std::vector<uint8_t> &tags);
108
109 virtual Status WriteMemoryTags(int32_t type, lldb::addr_t addr, size_t len,
110 const std::vector<uint8_t> &tags);
111
112 /// Reads a null terminated string from memory.
113 ///
114 /// Reads up to \p max_size bytes of memory until it finds a '\0'.
115 /// If a '\0' is not found then it reads max_size-1 bytes as a string and a
116 /// '\0' is added as the last character of the \p buffer.
117 ///
118 /// \param[in] addr
119 /// The address in memory to read from.
120 ///
121 /// \param[in] buffer
122 /// An allocated buffer with at least \p max_size size.
123 ///
124 /// \param[in] max_size
125 /// The maximum number of bytes to read from memory until it reads the
126 /// string.
127 ///
128 /// \param[out] total_bytes_read
129 /// The number of bytes read from memory into \p buffer.
130 ///
131 /// \return
132 /// Returns a StringRef backed up by the \p buffer passed in.
133 llvm::Expected<llvm::StringRef>
134 ReadCStringFromMemory(lldb::addr_t addr, char *buffer, size_t max_size,
135 size_t &total_bytes_read);
136
137 /// Write memory while not overwriting breakpoints in memory. The breakpoints'
138 /// saved bytes are updated with what would have been written.
139 Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
140 size_t &bytes_written);
141
142 virtual llvm::Expected<lldb::addr_t> AllocateMemory(size_t size,
143 uint32_t permissions) {
144 return llvm::make_error<UnimplementedError>();
145 }
146
147 virtual llvm::Error DeallocateMemory(lldb::addr_t addr) {
148 return llvm::make_error<UnimplementedError>();
149 }
150
152
153 virtual llvm::Expected<std::vector<SVR4LibraryInfo>>
155 return llvm::createStringError(llvm::inconvertibleErrorCode(),
156 "Not implemented");
157 }
158
159 /// Return the currently loaded libraries of the target in the
160 /// `qXfer:libraries:read` form (generic name + base address pairs; used on
161 /// Windows, where the inferior is not SVR4 and the module list comes from
162 /// the PE loader).
163 virtual llvm::Expected<std::vector<LoadedLibraryInfo>> GetLoadedLibraries() {
164 return llvm::createStringError(llvm::inconvertibleErrorCode(),
165 "Not implemented");
166 }
167
168 virtual bool HasPendingLibraryEvents() { return false; }
169
170 virtual bool IsAlive() const;
171
172 virtual size_t UpdateThreads() = 0;
173
174 virtual const ArchSpec &GetArchitecture() const = 0;
175
176 // Breakpoint functions
177 virtual Status SetBreakpoint(lldb::addr_t addr, uint32_t size,
178 bool hardware) = 0;
179
180 virtual Status RemoveBreakpoint(lldb::addr_t addr, bool hardware = false);
181
183 return m_software_breakpoints.find(addr) != m_software_breakpoints.end();
184 }
185
186 // Hardware Breakpoint functions
187 virtual const HardwareBreakpointMap &GetHardwareBreakpointMap() const;
188
189 virtual Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size);
190
192
193 // Watchpoint functions
195
196 virtual std::optional<std::pair<uint32_t, uint32_t>>
198
199 virtual Status SetWatchpoint(lldb::addr_t addr, size_t size,
200 uint32_t watch_flags, bool hardware);
201
203
204 // Accessors
205 lldb::pid_t GetID() const { return m_pid; }
206
208
209 bool IsRunning() const {
211 }
212
213 bool IsStepping() const { return m_state == lldb::eStateStepping; }
214
215 bool CanResume() const { return m_state == lldb::eStateStopped; }
216
220
221 uint32_t GetAddressByteSize() const {
223 }
224
225 virtual llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
226 GetAuxvData() const = 0;
227
228 // Exit Status
229 virtual std::optional<WaitStatus> GetExitStatus();
230
231 virtual bool SetExitStatus(WaitStatus status, bool bNotifyStateChange);
232
233 // Access to threads
235
237
239
241
245
249
250 // Access to inferior stdio
251 virtual int GetTerminalFileDescriptor() { return m_terminal_fd; }
252
253 /// Write up to \p len bytes from \p buf to the inferior's stdin.
254 virtual size_t WriteStdin(const void *buf, size_t len, Status &error) {
255 return 0;
256 }
257
258 // Stop id interface
259 uint32_t GetStopID() const;
260
261 // Callbacks for low-level process state changes
263 public:
264 virtual ~NativeDelegate() = default;
265
266 virtual void InitializeDelegate(NativeProcessProtocol *process) = 0;
267
269 lldb::StateType state) = 0;
270
271 virtual void DidExec(NativeProcessProtocol *process) = 0;
272
273 virtual void
275 std::unique_ptr<NativeProcessProtocol> child_process) = 0;
276
277 /// Called by the platform when the inferior writes to stdout/stderr
278 /// through a redirected pseudoconsole that the platform owns.
280 llvm::StringRef data) {}
281 };
282
283 virtual Status GetLoadedModuleFileSpec(const char *module_path,
284 FileSpec &file_spec) = 0;
285
286 virtual Status GetFileLoadAddress(const llvm::StringRef &file_name,
287 lldb::addr_t &load_addr) = 0;
288
289 /// Extension flag constants, returned by Manager::GetSupportedExtensions()
290 /// and passed to SetEnabledExtension()
291 enum class Extension {
292 multiprocess = (1u << 0),
293 fork = (1u << 1),
294 vfork = (1u << 2),
295 pass_signals = (1u << 3),
296 auxv = (1u << 4),
297 libraries_svr4 = (1u << 5),
298 memory_tagging = (1u << 6),
299 savecore = (1u << 7),
300 siginfo_read = (1u << 8),
301 libraries = (1u << 9),
303
305 };
306
307 class Manager {
308 public:
309 Manager(MainLoop &mainloop) : m_mainloop(mainloop) {}
310 Manager(const Manager &) = delete;
311 Manager &operator=(const Manager &) = delete;
312
313 virtual ~Manager();
314
315 /// Launch a process for debugging.
316 ///
317 /// \param[in] launch_info
318 /// Information required to launch the process.
319 ///
320 /// \param[in] native_delegate
321 /// The delegate that will receive messages regarding the
322 /// inferior. Must outlive the NativeProcessProtocol
323 /// instance.
324 ///
325 /// \param[in] mainloop
326 /// The mainloop instance with which the process can register
327 /// callbacks. Must outlive the NativeProcessProtocol
328 /// instance.
329 ///
330 /// \return
331 /// A NativeProcessProtocol shared pointer if the operation succeeded or
332 /// an error object if it failed.
333 virtual llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
335 NativeDelegate &native_delegate) = 0;
336
337 /// Attach to an existing process.
338 ///
339 /// \param[in] pid
340 /// pid of the process locatable
341 ///
342 /// \param[in] native_delegate
343 /// The delegate that will receive messages regarding the
344 /// inferior. Must outlive the NativeProcessProtocol
345 /// instance.
346 ///
347 /// \param[in] mainloop
348 /// The mainloop instance with which the process can register
349 /// callbacks. Must outlive the NativeProcessProtocol
350 /// instance.
351 ///
352 /// \return
353 /// A NativeProcessProtocol shared pointer if the operation succeeded or
354 /// an error object if it failed.
355 virtual llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
356 Attach(lldb::pid_t pid, NativeDelegate &native_delegate) = 0;
357
358 /// Get the bitmask of extensions supported by this process plugin.
359 ///
360 /// \return
361 /// A NativeProcessProtocol::Extension bitmask.
362 virtual Extension GetSupportedExtensions() const { return {}; }
363
364 protected:
366 };
367
368 /// Notify tracers that the target process will resume
370
371 /// Notify tracers that the target process just stopped
373
374 /// Start tracing a process or its threads.
375 ///
376 /// \param[in] json_params
377 /// JSON object with the information of what and how to trace.
378 /// In the case of gdb-remote, this object should conform to the
379 /// jLLDBTraceStart packet.
380 ///
381 /// This object should have a string entry called "type", which is the
382 /// tracing technology name.
383 ///
384 /// \param[in] type
385 /// Tracing technology type, as described in the \a json_params.
386 ///
387 /// \return
388 /// \a llvm::Error::success if the operation was successful, or an
389 /// \a llvm::Error otherwise.
390 virtual llvm::Error TraceStart(llvm::StringRef json_params,
391 llvm::StringRef type) {
392 return llvm::createStringError(llvm::inconvertibleErrorCode(),
393 "Unsupported tracing type '%s'",
394 type.data());
395 }
396
397 /// \copydoc Process::TraceStop(const TraceStopRequest &)
398 virtual llvm::Error TraceStop(const TraceStopRequest &request) {
399 return llvm::createStringError(llvm::inconvertibleErrorCode(),
400 "Unsupported tracing type '%s'",
401 request.type.data());
402 }
403
404 /// \copydoc Process::TraceGetState(llvm::StringRef type)
405 virtual llvm::Expected<llvm::json::Value>
406 TraceGetState(llvm::StringRef type) {
407 return llvm::createStringError(llvm::inconvertibleErrorCode(),
408 "Unsupported tracing type '%s'",
409 type.data());
410 }
411
412 /// \copydoc Process::TraceGetBinaryData(const TraceGetBinaryDataRequest &)
413 virtual llvm::Expected<std::vector<uint8_t>>
415 return llvm::createStringError(
416 llvm::inconvertibleErrorCode(),
417 "Unsupported data kind '%s' for the '%s' tracing technology",
418 request.kind.c_str(), request.type.c_str());
419 }
420
421 /// \copydoc Process::TraceSupported()
422 virtual llvm::Expected<TraceSupportedResponse> TraceSupported() {
423 return llvm::make_error<UnimplementedError>();
424 }
425
426 /// Method called in order to propagate the bitmap of protocol
427 /// extensions supported by the client.
428 ///
429 /// \param[in] flags
430 /// The bitmap of enabled extensions.
431 virtual void SetEnabledExtensions(Extension flags) {
432 m_enabled_extensions = flags;
433 }
434
435 /// Write a core dump (without crashing the program).
436 ///
437 /// \param[in] path_hint
438 /// Suggested core dump path (optional, can be empty).
439 ///
440 /// \return
441 /// Path to the core dump if successfully written, an error
442 /// otherwise.
443 virtual llvm::Expected<std::string> SaveCore(llvm::StringRef path_hint) {
444 return llvm::createStringError(llvm::inconvertibleErrorCode(),
445 "Not implemented");
446 }
447
448 /// Get the list of structured data plugins supported by this process. They
449 /// must match the `type` field used by the corresponding
450 /// StructuredDataPlugins in the client.
451 ///
452 /// \return
453 /// A vector of structured data plugin names.
454 virtual std::vector<std::string> GetStructuredDataPlugins() { return {}; };
455
456protected:
458 llvm::SmallVector<uint8_t, 4> saved_opcodes;
459 llvm::ArrayRef<uint8_t> breakpoint_opcodes;
460 };
461
462 // Using std::map so that breakpoints are sorted in ascending address order.
463 // WriteMemory relies on this.
464 std::map<lldb::addr_t, SoftwareBreakpoint> m_software_breakpoints;
466
467 std::vector<std::unique_ptr<NativeThreadProtocol>> m_threads;
469 mutable std::recursive_mutex m_threads_mutex;
470
472 mutable std::recursive_mutex m_state_mutex;
473
474 std::optional<WaitStatus> m_exit_status;
475
480 uint32_t m_stop_id = 0;
481
482 // Set of signal numbers that LLDB directly injects back to inferior without
483 // stopping it.
484 llvm::DenseSet<int> m_signals_to_ignore;
485
486 // Extensions enabled per the last SetEnabledExtensions() call.
488
489 // Write to memory, with no awareness of software breakpoint sites. Used to
490 // implement WriteMemory. May be called directly for use cases that should
491 // ignore software breakpoint sites, for example adding or removing those
492 // breakpoints.
493 virtual Status DoWriteMemory(lldb::addr_t addr, const void *buf, size_t size,
494 size_t &bytes_written) = 0;
495
496 // lldb_private::Host calls should be used to launch a process for debugging,
497 // and then the process should be attached to. When attaching to a process
498 // lldb_private::Host calls should be used to locate the process to attach
499 // to, and then this function should be called.
500 NativeProcessProtocol(lldb::pid_t pid, int terminal_fd,
501 NativeDelegate &delegate);
502
503 void SetID(lldb::pid_t pid) { m_pid = pid; }
504
505 // interface for state handling
506 void SetState(lldb::StateType state, bool notify_delegates = true);
507
508 // Derived classes need not implement this. It can be used as a hook to
509 // clear internal caches that should be invalidated when stop ids change.
510 //
511 // Note this function is called with the state mutex obtained by the caller.
512 virtual void DoStopIDBumped(uint32_t newBumpId);
513
514 // interface for software breakpoints
515
516 Status SetSoftwareBreakpoint(lldb::addr_t addr, uint32_t size_hint);
518
519 virtual llvm::Expected<llvm::ArrayRef<uint8_t>>
520 GetSoftwareBreakpointTrapOpcode(size_t size_hint);
521
522 /// Return the offset of the PC relative to the software breakpoint that was hit. If an
523 /// architecture (e.g. arm) reports breakpoint hits before incrementing the PC, this offset
524 /// will be 0. If an architecture (e.g. intel) reports breakpoints hits after incrementing the
525 /// PC, this offset will be the size of the breakpoint opcode.
526 virtual size_t GetSoftwareBreakpointPCOffset();
527
528 // Adjust the thread's PC after hitting a software breakpoint. On
529 // architectures where the PC points after the breakpoint instruction, this
530 // resets it to point to the breakpoint itself.
532
533 /// Notify the delegate that an exec occurred.
534 ///
535 /// Provide a mechanism for a delegate to clear out any exec-
536 /// sensitive data.
537 virtual void NotifyDidExec();
538
540
541private:
543 llvm::Expected<SoftwareBreakpoint>
544 EnableSoftwareBreakpoint(lldb::addr_t addr, uint32_t size_hint);
545};
546} // namespace lldb_private
547
548#endif // LLDB_HOST_COMMON_NATIVEPROCESSPROTOCOL_H
static llvm::raw_ostream & error(Stream &strm)
An architecture specification class.
Definition ArchSpec.h:32
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
Definition ArchSpec.cpp:889
lldb::ByteOrder GetByteOrder() const
Returns the byte order for the architecture specification.
Definition ArchSpec.cpp:938
A file utility class.
Definition FileSpec.h:56
Manager & operator=(const Manager &)=delete
virtual llvm::Expected< std::unique_ptr< NativeProcessProtocol > > Attach(lldb::pid_t pid, NativeDelegate &native_delegate)=0
Attach to an existing process.
virtual llvm::Expected< std::unique_ptr< NativeProcessProtocol > > Launch(ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate)=0
Launch a process for debugging.
virtual Extension GetSupportedExtensions() const
Get the bitmask of extensions supported by this process plugin.
virtual void ProcessStateChanged(NativeProcessProtocol *process, lldb::StateType state)=0
virtual void DidExec(NativeProcessProtocol *process)=0
virtual void NewSubprocess(NativeProcessProtocol *parent_process, std::unique_ptr< NativeProcessProtocol > child_process)=0
virtual void NewProcessOutput(NativeProcessProtocol *process, llvm::StringRef data)
Called by the platform when the inferior writes to stdout/stderr through a redirected pseudoconsole t...
virtual void InitializeDelegate(NativeProcessProtocol *process)=0
virtual Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware)
virtual lldb::addr_t GetSharedLibraryInfoAddress()=0
virtual Status ReadMemoryTags(int32_t type, lldb::addr_t addr, size_t len, std::vector< uint8_t > &tags)
llvm::Expected< SoftwareBreakpoint > EnableSoftwareBreakpoint(lldb::addr_t addr, uint32_t size_hint)
virtual llvm::Expected< TraceSupportedResponse > TraceSupported()
Get the processor tracing type supported for this process.
virtual Status GetMemoryRegionInfo(lldb::addr_t load_addr, MemoryRegionInfo &range_info)
std::vector< std::unique_ptr< NativeThreadProtocol > > thread_collection
virtual std::vector< std::string > GetStructuredDataPlugins()
Get the list of structured data plugins supported by this process.
virtual void NotifyTracersProcessWillResume()
Notify tracers that the target process will resume.
virtual void NotifyTracersProcessDidStop()
Notify tracers that the target process just stopped.
virtual std::optional< WaitStatus > GetExitStatus()
virtual void SetEnabledExtensions(Extension flags)
Method called in order to propagate the bitmap of protocol extensions supported by the client.
virtual Status RemoveWatchpoint(lldb::addr_t addr)
virtual Status Interrupt()
Tells a process to interrupt all operations as if by a Ctrl-C.
virtual Status WriteMemoryTags(int32_t type, lldb::addr_t addr, size_t len, const std::vector< uint8_t > &tags)
virtual void DoStopIDBumped(uint32_t newBumpId)
NativeProcessProtocol(lldb::pid_t pid, int terminal_fd, NativeDelegate &delegate)
virtual llvm::Expected< std::vector< SVR4LibraryInfo > > GetLoadedSVR4Libraries()
virtual size_t GetSoftwareBreakpointPCOffset()
Return the offset of the PC relative to the software breakpoint that was hit.
virtual llvm::Expected< std::vector< uint8_t > > TraceGetBinaryData(const TraceGetBinaryDataRequest &request)
Get binary data given a trace technology and a data identifier.
virtual const HardwareBreakpointMap & GetHardwareBreakpointMap() const
virtual llvm::Error TraceStop(const TraceStopRequest &request)
Stop tracing a live process or its threads.
virtual Status GetLoadedModuleFileSpec(const char *module_path, FileSpec &file_spec)=0
Status SetSoftwareBreakpoint(lldb::addr_t addr, uint32_t size_hint)
virtual Status IgnoreSignals(llvm::ArrayRef< int > signals)
virtual llvm::Expected< std::vector< LoadedLibraryInfo > > GetLoadedLibraries()
Return the currently loaded libraries of the target in the qXfer:libraries:read form (generic name + ...
NativeThreadProtocol * GetThreadByIDUnlocked(lldb::tid_t tid)
virtual llvm::Expected< llvm::json::Value > TraceGetState(llvm::StringRef type)
Get the current tracing state of the process and its threads.
virtual Status SetBreakpoint(lldb::addr_t addr, uint32_t size, bool hardware)=0
virtual const ArchSpec & GetArchitecture() const =0
LockingAdaptedIterable< std::recursive_mutex, thread_collection, llvm::pointee_iterator< thread_collection::const_iterator > > ThreadIterable
virtual const NativeWatchpointList::WatchpointMap & GetWatchpointMap() const
virtual llvm::Error DeallocateMemory(lldb::addr_t addr)
void SetState(lldb::StateType state, bool notify_delegates=true)
llvm::Expected< llvm::StringRef > ReadCStringFromMemory(lldb::addr_t addr, char *buffer, size_t max_size, size_t &total_bytes_read)
Reads a null terminated string from memory.
virtual Status DoWriteMemory(lldb::addr_t addr, const void *buf, size_t size, size_t &bytes_written)=0
NativeThreadProtocol * GetThreadByID(lldb::tid_t tid)
virtual Status GetFileLoadAddress(const llvm::StringRef &file_name, lldb::addr_t &load_addr)=0
Status ReadMemoryWithoutTrap(const ProcessAddress &addr, void *buf, size_t size, size_t &bytes_read)
void SynchronouslyNotifyProcessStateChanged(lldb::StateType state)
virtual llvm::Expected< std::string > SaveCore(llvm::StringRef path_hint)
Write a core dump (without crashing the program).
Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size, size_t &bytes_written)
Write memory while not overwriting breakpoints in memory.
std::vector< std::unique_ptr< NativeThreadProtocol > > m_threads
std::optional< WaitStatus > m_exit_status
virtual bool SetExitStatus(WaitStatus status, bool bNotifyStateChange)
virtual Status RemoveBreakpoint(lldb::addr_t addr, bool hardware=false)
virtual size_t WriteStdin(const void *buf, size_t len, Status &error)
Write up to len bytes from buf to the inferior's stdin.
virtual Status Resume(const ResumeActionList &resume_actions)=0
virtual ~NativeProcessProtocol()=default
virtual Status Signal(int signo)=0
Sends a process a UNIX signal signal.
Status RemoveSoftwareBreakpoint(lldb::addr_t addr)
void FixupBreakpointPCAsNeeded(NativeThreadProtocol &thread)
NativeThreadProtocol * GetThreadAtIndex(uint32_t idx)
virtual void NotifyDidExec()
Notify the delegate that an exec occurred.
virtual Status ReadMemory(const ProcessAddress &addr, void *buf, size_t size, size_t &bytes_read)=0
virtual llvm::Expected< lldb::addr_t > AllocateMemory(size_t size, uint32_t permissions)
Extension
Extension flag constants, returned by Manager::GetSupportedExtensions() and passed to SetEnabledExten...
virtual Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size)
std::map< lldb::addr_t, SoftwareBreakpoint > m_software_breakpoints
virtual llvm::ErrorOr< std::unique_ptr< llvm::MemoryBuffer > > GetAuxvData() const =0
virtual std::optional< std::pair< uint32_t, uint32_t > > GetHardwareDebugSupportInfo() const
virtual llvm::Expected< llvm::ArrayRef< uint8_t > > GetSoftwareBreakpointTrapOpcode(size_t size_hint)
virtual llvm::Error TraceStart(llvm::StringRef json_params, llvm::StringRef type)
Start tracing a process or its threads.
virtual Status RemoveHardwareBreakpoint(lldb::addr_t addr)
std::map< lldb::addr_t, NativeWatchpoint > WatchpointMap
An address in a process, qualified by an address space.
An error handling class.
Definition Status.h:118
#define LLDB_INVALID_THREAD_ID
A class that represents a running process on the host machine.
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()
MainLoopPosix MainLoop
Definition MainLoop.h:20
std::map< lldb::addr_t, HardwareBreakpoint > HardwareBreakpointMap
StateType
Process and Thread States.
@ eStateStopped
Process or thread is stopped and can be examined.
@ eStateRunning
Process or thread is running and can't be examined.
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
uint64_t pid_t
Definition lldb-types.h:84
ByteOrder
Byte ordering definitions.
uint64_t addr_t
Definition lldb-types.h:80
uint64_t tid_t
Definition lldb-types.h:85
Generic loaded-library entry used by the non-SVR4 qXfer:libraries:read form of the GDB remote library...
jLLDBTraceGetBinaryData gdb-remote packet
std::string kind
Identifier for the data.
std::string type
Tracing technology name, e.g. intel-pt, arm-coresight.
jLLDBTraceStop gdb-remote packet
std::string type
Tracing technology name, e.g. intel-pt, arm-coresight.