LLDB mainline
GDBRemoteCommunicationClient.h
Go to the documentation of this file.
1//===-- GDBRemoteCommunicationClient.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_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATIONCLIENT_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATIONCLIENT_H
11
12#include "GDBRemoteClientBase.h"
13
14#include <chrono>
15#include <map>
16#include <mutex>
17#include <optional>
18#include <string>
19#include <vector>
20
21#include "lldb/Host/File.h"
27#include "lldb/Utility/UUID.h"
28#if defined(_WIN32)
30#endif
31
32#include "llvm/Support/VersionTuple.h"
33
34namespace lldb_private {
35namespace process_gdb_remote {
36
37/// The offsets used by the target when relocating the executable. Decoded from
38/// qOffsets packet response.
39struct QOffsets {
40 /// If true, the offsets field describes segments. Otherwise, it describes
41 /// sections.
43
44 /// The individual offsets. Section offsets have two or three members.
45 /// Segment offsets have either one of two.
46 std::vector<uint64_t> offsets;
47};
48inline bool operator==(const QOffsets &a, const QOffsets &b) {
49 return a.segments == b.segments && a.offsets == b.offsets;
50}
51llvm::raw_ostream &operator<<(llvm::raw_ostream &os, const QOffsets &offsets);
52
53// A trivial struct used to return a pair of PID and TID.
54struct PidTid {
55 uint64_t pid;
56 uint64_t tid;
57};
58
60public:
62
64
65 // After connecting, send the handshake to the server to make sure
66 // we are communicating with it.
67 bool HandshakeWithServer(Status *error_ptr);
68
70
71 // This packet is usually sent first and the boolean return value
72 // indicates if the packet was send and any response was received
73 // even in the response is UNIMPLEMENTED. If the packet failed to
74 // get a response, then false is returned. This quickly tells us
75 // if we were able to connect and communicate with the remote GDB
76 // server
78
80
81 lldb::pid_t GetCurrentProcessID(bool allow_lazy = true);
82
83 bool LaunchGDBServer(const char *remote_accept_hostname, lldb::pid_t &pid,
84 uint16_t &port, std::string &socket_name);
85
86 size_t QueryGDBServer(
87 std::vector<std::pair<uint16_t, std::string>> &connection_urls);
88
90
91 /// Launch the process using the provided arguments.
92 ///
93 /// \param[in] args
94 /// A list of program arguments. The first entry is the program being run.
95 llvm::Error LaunchProcess(const Args &args);
96
97 /// Sends a "QEnvironment:NAME=VALUE" packet that will build up the
98 /// environment that will get used when launching an application
99 /// in conjunction with the 'A' packet. This function can be called
100 /// multiple times in a row in order to pass on the desired
101 /// environment that the inferior should be launched with.
102 ///
103 /// \param[in] name_equal_value
104 /// A NULL terminated C string that contains a single environment
105 /// in the format "NAME=VALUE".
106 ///
107 /// \return
108 /// Zero if the response was "OK", a positive value if the
109 /// the response was "Exx" where xx are two hex digits, or
110 /// -1 if the call is unsupported or any other unexpected
111 /// response was received.
112 int SendEnvironmentPacket(char const *name_equal_value);
113 int SendEnvironment(const Environment &env);
114
115 int SendLaunchArchPacket(const char *arch);
116
117 int SendLaunchEventDataPacket(const char *data,
118 bool *was_supported = nullptr);
119
120 /// Sends a GDB remote protocol 'I' packet that delivers stdin
121 /// data to the remote process.
122 ///
123 /// \param[in] data
124 /// A pointer to stdin data.
125 ///
126 /// \param[in] data_len
127 /// The number of bytes available at \a data.
128 ///
129 /// \return
130 /// Zero if the attach was successful, or an error indicating
131 /// an error code.
132 int SendStdinNotification(const char *data, size_t data_len);
133
134 /// Sets the path to use for stdin/out/err for a process
135 /// that will be launched with the 'A' packet.
136 ///
137 /// \param[in] file_spec
138 /// The path to use for stdin/out/err
139 ///
140 /// \return
141 /// Zero if the for success, or an error code for failure.
142 int SetSTDIN(const FileSpec &file_spec);
143 int SetSTDOUT(const FileSpec &file_spec);
144 int SetSTDERR(const FileSpec &file_spec);
145
146 /// Sets the disable ASLR flag to \a enable for a process that will
147 /// be launched with the 'A' packet.
148 ///
149 /// \param[in] enable
150 /// A boolean value indicating whether to disable ASLR or not.
151 ///
152 /// \return
153 /// Zero if the for success, or an error code for failure.
154 int SetDisableASLR(bool enable);
155
156 /// Sets the DetachOnError flag to \a enable for the process controlled by the
157 /// stub.
158 ///
159 /// \param[in] enable
160 /// A boolean value indicating whether to detach on error or not.
161 ///
162 /// \return
163 /// Zero if the for success, or an error code for failure.
164 int SetDetachOnError(bool enable);
165
166 /// Sets the working directory to \a path for a process that will
167 /// be launched with the 'A' packet for non platform based
168 /// connections. If this packet is sent to a GDB server that
169 /// implements the platform, it will change the current working
170 /// directory for the platform process.
171 ///
172 /// \param[in] working_dir
173 /// The path to a directory to use when launching our process
174 ///
175 /// \return
176 /// Zero if the for success, or an error code for failure.
177 int SetWorkingDir(const FileSpec &working_dir);
178
179 /// Gets the current working directory of a remote platform GDB
180 /// server.
181 ///
182 /// \param[out] working_dir
183 /// The current working directory on the remote platform.
184 ///
185 /// \return
186 /// Boolean for success
187 bool GetWorkingDir(FileSpec &working_dir);
188
189 lldb::addr_t AllocateMemory(size_t size, uint32_t permissions);
190
192
193 Status Detach(bool keep_stopped, lldb::pid_t pid = LLDB_INVALID_PROCESS_ID);
194
196
197 std::optional<uint32_t> GetWatchpointSlotCount();
198
199 std::optional<bool> GetWatchpointReportedAfter();
200
202
203 std::chrono::seconds GetHostDefaultPacketTimeout();
204
206
208 bool &value_is_offset);
209
210 std::vector<lldb::addr_t> GetProcessStandaloneBinaries();
211
212 void GetRemoteQSupported();
213
214 bool GetVContSupported(char flavor);
215
217
218 bool GetxPacketSupported();
219
221
223
224 void ResetDiscoverableSettings(bool did_exec);
225
226 bool GetHostInfo(bool force = false);
227
229
230 llvm::VersionTuple GetOSVersion();
231
232 llvm::VersionTuple GetMacCatalystVersion();
233
234 std::optional<std::string> GetOSBuildString();
235
236 std::optional<std::string> GetOSKernelDescription();
237
239
241
242 bool GetHostname(std::string &s);
243
245
246 bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &process_info);
247
248 uint32_t FindProcesses(const ProcessInstanceInfoMatch &process_match_info,
249 ProcessInstanceInfoList &process_infos);
250
251 bool GetUserName(uint32_t uid, std::string &name);
252
253 bool GetGroupName(uint32_t gid, std::string &name);
254
256
257 bool HasAnyVContSupport() { return GetVContSupported('a'); }
258
260
262
264 switch (type) {
266 return m_supports_z0;
268 return m_supports_z1;
269 case eWatchpointWrite:
270 return m_supports_z2;
271 case eWatchpointRead:
272 return m_supports_z3;
274 return m_supports_z4;
275 default:
276 return false;
277 }
278 }
279
281 GDBStoppointType type, // Type of breakpoint or watchpoint
282 bool insert, // Insert or remove?
283 lldb::addr_t addr, // Address of breakpoint or watchpoint
284 uint32_t length, // Byte Size of breakpoint or watchpoint
285 std::chrono::seconds interrupt_timeout); // Time to wait for an interrupt
286
287 void TestPacketSpeed(const uint32_t num_packets, uint32_t max_send,
288 uint32_t max_recv, uint64_t recv_amount, bool json,
289 Stream &strm);
290
291 // This packet is for testing the speed of the interface only. Both
292 // the client and server need to support it, but this allows us to
293 // measure the packet speed without any other work being done on the
294 // other end and avoids any of that work affecting the packet send
295 // and response times.
296 bool SendSpeedTestPacket(uint32_t send_size, uint32_t recv_size);
297
298 std::optional<PidTid> SendSetCurrentThreadPacket(uint64_t tid, uint64_t pid,
299 char op);
300
301 bool SetCurrentThread(uint64_t tid,
303
304 bool SetCurrentThreadForRun(uint64_t tid,
306
308
310
312
314
315 uint64_t GetRemoteMaxPacketSize();
316
317 bool GetEchoSupported();
318
320
322
324
326
328
330
332 {
333 // Uncomment this to have lldb pretend the debug server doesn't respond to
334 // alloc/dealloc memory packets.
335 // m_supports_alloc_dealloc_memory = lldb_private::eLazyBoolNo;
337 }
338
339 std::vector<std::pair<lldb::pid_t, lldb::tid_t>>
340 GetCurrentProcessAndThreadIDs(bool &sequence_mutex_unavailable);
341
342 size_t GetCurrentThreadIDs(std::vector<lldb::tid_t> &thread_ids,
343 bool &sequence_mutex_unavailable);
344
345 lldb::user_id_t OpenFile(const FileSpec &file_spec, File::OpenOptions flags,
346 mode_t mode, Status &error);
347
349
350 std::optional<GDBRemoteFStatData> FStat(lldb::user_id_t fd);
351
352 // NB: this is just a convenience wrapper over open() + fstat(). It does not
353 // work if the file cannot be opened.
354 std::optional<GDBRemoteFStatData> Stat(const FileSpec &file_spec);
355
356 lldb::user_id_t GetFileSize(const FileSpec &file_spec);
357
359 bool only_dir);
360
361 Status GetFilePermissions(const FileSpec &file_spec,
362 uint32_t &file_permissions);
363
364 Status SetFilePermissions(const FileSpec &file_spec,
365 uint32_t file_permissions);
366
367 uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst,
368 uint64_t dst_len, Status &error);
369
370 uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset, const void *src,
371 uint64_t src_len, Status &error);
372
373 Status CreateSymlink(const FileSpec &src, const FileSpec &dst);
374
375 Status Unlink(const FileSpec &file_spec);
376
377 Status MakeDirectory(const FileSpec &file_spec, uint32_t mode);
378
379 bool GetFileExists(const FileSpec &file_spec);
380
382 llvm::StringRef command,
383 const FileSpec &working_dir, // Pass empty FileSpec to use the current
384 // working directory
385 int *status_ptr, // Pass nullptr if you don't want the process exit status
386 int *signo_ptr, // Pass nullptr if you don't want the signal that caused
387 // the process to exit
388 std::string
389 *command_output, // Pass nullptr if you don't want the command output
390 const Timeout<std::micro> &timeout);
391
392 bool CalculateMD5(const FileSpec &file_spec, uint64_t &high, uint64_t &low);
393
394 lldb::DataBufferSP ReadRegister(
395 lldb::tid_t tid,
397 reg_num); // Must be the eRegisterKindProcessPlugin register number
398
399 lldb::DataBufferSP ReadAllRegisters(lldb::tid_t tid);
400
401 bool
403 uint32_t reg_num, // eRegisterKindProcessPlugin register number
404 llvm::ArrayRef<uint8_t> data);
405
406 bool WriteAllRegisters(lldb::tid_t tid, llvm::ArrayRef<uint8_t> data);
407
408 bool SaveRegisterState(lldb::tid_t tid, uint32_t &save_id);
409
410 bool RestoreRegisterState(lldb::tid_t tid, uint32_t save_id);
411
413
414 const char *GetGDBServerProgramName();
415
417
418 bool AvoidGPackets(ProcessGDBRemote *process);
419
421
423
425
427
429
431
432 bool UsesNativeSignals();
433
434 lldb::DataBufferSP ReadMemoryTags(lldb::addr_t addr, size_t len,
435 int32_t type);
436
437 Status WriteMemoryTags(lldb::addr_t addr, size_t len, int32_t type,
438 const std::vector<uint8_t> &tags);
439
440 /// Use qOffsets to query the offset used when relocating the target
441 /// executable. If successful, the returned structure will contain at least
442 /// one value in the offsets field.
443 std::optional<QOffsets> GetQOffsets();
444
445 bool GetModuleInfo(const FileSpec &module_file_spec,
446 const ArchSpec &arch_spec, ModuleSpec &module_spec);
447
448 std::optional<std::vector<ModuleSpec>>
449 GetModulesInfo(llvm::ArrayRef<FileSpec> module_file_specs,
450 const llvm::Triple &triple);
451
452 llvm::Expected<std::string> ReadExtFeature(llvm::StringRef object,
453 llvm::StringRef annex);
454
456
457 // Sends QPassSignals packet to the server with given signals to ignore.
458 Status SendSignalsToIgnore(llvm::ArrayRef<int32_t> signals);
459
460 /// Return the feature set supported by the gdb-remote server.
461 ///
462 /// This method returns the remote side's response to the qSupported
463 /// packet. The response is the complete string payload returned
464 /// to the client.
465 ///
466 /// \return
467 /// The string returned by the server to the qSupported query.
468 const std::string &GetServerSupportedFeatures() const {
470 }
471
472 /// Return the array of async JSON packet types supported by the remote.
473 ///
474 /// This method returns the remote side's array of supported JSON
475 /// packet types as a list of type names. Each of the results are
476 /// expected to have an Enable{type_name} command to enable and configure
477 /// the related feature. Each type_name for an enabled feature will
478 /// possibly send async-style packets that contain a payload of a
479 /// binhex-encoded JSON dictionary. The dictionary will have a
480 /// string field named 'type', that contains the type_name of the
481 /// supported packet type.
482 ///
483 /// There is a Plugin category called structured-data plugins.
484 /// A plugin indicates whether it knows how to handle a type_name.
485 /// If so, it can be used to process the async JSON packet.
486 ///
487 /// \return
488 /// The string returned by the server to the qSupported query.
490
491 /// Configure a StructuredData feature on the remote end.
492 ///
493 /// \see \b Process::ConfigureStructuredData(...) for details.
494 Status
496 const StructuredData::ObjectSP &config_sp);
497
498 llvm::Expected<TraceSupportedResponse>
499 SendTraceSupported(std::chrono::seconds interrupt_timeout);
500
501 llvm::Error SendTraceStart(const llvm::json::Value &request,
502 std::chrono::seconds interrupt_timeout);
503
504 llvm::Error SendTraceStop(const TraceStopRequest &request,
505 std::chrono::seconds interrupt_timeout);
506
507 llvm::Expected<std::string>
508 SendTraceGetState(llvm::StringRef type,
509 std::chrono::seconds interrupt_timeout);
510
511 llvm::Expected<std::vector<uint8_t>>
513 std::chrono::seconds interrupt_timeout);
514
515 bool GetSaveCoreSupported() const;
516
517 llvm::Expected<int> KillProcess(lldb::pid_t pid);
518
519protected:
561
572
573 /// Current gdb remote protocol process identifier for all other operations
575 /// Current gdb remote protocol process identifier for continue, step, etc
577 /// Current gdb remote protocol thread identifier for all other operations
579 /// Current gdb remote protocol thread identifier for continue, step, etc
581
584
591 std::vector<lldb::addr_t> m_binary_addresses;
592 llvm::VersionTuple m_os_version;
593 llvm::VersionTuple m_maccatalyst_version;
594 std::string m_os_build;
595 std::string m_os_kernel;
596 std::string m_hostname;
597 std::string m_gdb_server_name; // from reply to qGDBServerVersion, empty if
598 // qGDBServerVersion is not supported
600 UINT32_MAX; // from reply to qGDBServerVersion, zero if
601 // qGDBServerVersion is not supported
602 std::chrono::seconds m_default_packet_timeout;
603 int m_target_vm_page_size = 0; // target system VM page size; 0 unspecified
604 uint64_t m_max_packet_size = 0; // as returned by qSupported
605 std::string m_qSupported_response; // the complete response to qSupported
606
609
610 std::vector<MemoryRegionInfo> m_qXfer_memory_map;
612
613 bool GetCurrentProcessInfo(bool allow_lazy_pid = true);
614
615 bool GetGDBServerVersion();
616
617 // Given the list of compression types that the remote debug stub can support,
618 // possibly enable compression if we find an encoding we can handle.
620 llvm::ArrayRef<llvm::StringRef> supported_compressions);
621
623 ProcessInstanceInfo &process_info);
624
625 void OnRunPacketSent(bool first) override;
626
628 lldb::tid_t tid, StreamString &&payload,
629 StringExtractorGDBRemote &response);
630
632 lldb::tid_t thread_id,
633 llvm::MutableArrayRef<uint8_t> &buffer,
634 size_t offset);
635
637
639 MemoryRegionInfo &region);
640
641 LazyBool GetThreadPacketSupported(lldb::tid_t tid, llvm::StringRef packetStr);
642
643private:
647};
648
649} // namespace process_gdb_remote
650} // namespace lldb_private
651
652#endif // LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATIONCLIENT_H
static llvm::raw_ostream & error(Stream &strm)
An architecture specification class.
Definition: ArchSpec.h:31
A command line argument class.
Definition: Args.h:33
"lldb/Utility/ArgCompletionRequest.h"
A uniqued constant string class.
Definition: ConstString.h:40
A file utility class.
Definition: FileSpec.h:56
A plug-in interface definition class for debugging a process.
Definition: Process.h:335
An error handling class.
Definition: Status.h:44
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
std::shared_ptr< Object > ObjectSP
lldb::DataBufferSP ReadRegister(lldb::tid_t tid, uint32_t reg_num)
bool CalculateMD5(const FileSpec &file_spec, uint64_t &high, uint64_t &low)
PacketResult SendThreadSpecificPacketAndWaitForResponse(lldb::tid_t tid, StreamString &&payload, StringExtractorGDBRemote &response)
bool DecodeProcessInfoResponse(StringExtractorGDBRemote &response, ProcessInstanceInfo &process_info)
lldb_private::StructuredData::Array * GetSupportedStructuredDataPlugins()
Return the array of async JSON packet types supported by the remote.
lldb::tid_t m_curr_tid_run
Current gdb remote protocol thread identifier for continue, step, etc.
int SendLaunchEventDataPacket(const char *data, bool *was_supported=nullptr)
std::optional< std::vector< ModuleSpec > > GetModulesInfo(llvm::ArrayRef< FileSpec > module_file_specs, const llvm::Triple &triple)
llvm::Expected< std::string > ReadExtFeature(llvm::StringRef object, llvm::StringRef annex)
std::optional< GDBRemoteFStatData > Stat(const FileSpec &file_spec)
std::optional< QOffsets > GetQOffsets()
Use qOffsets to query the offset used when relocating the target executable.
size_t QueryGDBServer(std::vector< std::pair< uint16_t, std::string > > &connection_urls)
Status SendGetTraceDataPacket(StreamGDBRemote &packet, lldb::user_id_t uid, lldb::tid_t thread_id, llvm::MutableArrayRef< uint8_t > &buffer, size_t offset)
llvm::Error SendTraceStop(const TraceStopRequest &request, std::chrono::seconds interrupt_timeout)
void TestPacketSpeed(const uint32_t num_packets, uint32_t max_send, uint32_t max_recv, uint64_t recv_amount, bool json, Stream &strm)
bool LaunchGDBServer(const char *remote_accept_hostname, lldb::pid_t &pid, uint16_t &port, std::string &socket_name)
bool SetCurrentThreadForRun(uint64_t tid, lldb::pid_t pid=LLDB_INVALID_PROCESS_ID)
uint8_t SendGDBStoppointTypePacket(GDBStoppointType type, bool insert, lldb::addr_t addr, uint32_t length, std::chrono::seconds interrupt_timeout)
Status RunShellCommand(llvm::StringRef command, const FileSpec &working_dir, int *status_ptr, int *signo_ptr, std::string *command_output, const Timeout< std::micro > &timeout)
uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst, uint64_t dst_len, Status &error)
bool GetWorkingDir(FileSpec &working_dir)
Gets the current working directory of a remote platform GDB server.
lldb::user_id_t OpenFile(const FileSpec &file_spec, File::OpenOptions flags, mode_t mode, Status &error)
std::optional< GDBRemoteFStatData > FStat(lldb::user_id_t fd)
llvm::Expected< std::string > SendTraceGetState(llvm::StringRef type, std::chrono::seconds interrupt_timeout)
llvm::Error LaunchProcess(const Args &args)
Launch the process using the provided arguments.
const GDBRemoteCommunicationClient & operator=(const GDBRemoteCommunicationClient &)=delete
uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset, const void *src, uint64_t src_len, Status &error)
bool SetCurrentThread(uint64_t tid, lldb::pid_t pid=LLDB_INVALID_PROCESS_ID)
const std::string & GetServerSupportedFeatures() const
Return the feature set supported by the gdb-remote server.
lldb::tid_t m_curr_tid
Current gdb remote protocol thread identifier for all other operations.
bool WriteAllRegisters(lldb::tid_t tid, llvm::ArrayRef< uint8_t > data)
bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &process_info)
Status SetFilePermissions(const FileSpec &file_spec, uint32_t file_permissions)
Status GetQXferMemoryMapRegionInfo(lldb::addr_t addr, MemoryRegionInfo &region)
int SetDetachOnError(bool enable)
Sets the DetachOnError flag to enable for the process controlled by the stub.
LazyBool GetThreadPacketSupported(lldb::tid_t tid, llvm::StringRef packetStr)
bool WriteRegister(lldb::tid_t tid, uint32_t reg_num, llvm::ArrayRef< uint8_t > data)
llvm::Expected< std::vector< uint8_t > > SendTraceGetBinaryData(const TraceGetBinaryDataRequest &request, std::chrono::seconds interrupt_timeout)
GDBRemoteCommunicationClient(const GDBRemoteCommunicationClient &)=delete
int SetSTDIN(const FileSpec &file_spec)
Sets the path to use for stdin/out/err for a process that will be launched with the 'A' packet.
lldb::pid_t m_curr_pid
Current gdb remote protocol process identifier for all other operations.
Status WriteMemoryTags(lldb::addr_t addr, size_t len, int32_t type, const std::vector< uint8_t > &tags)
size_t GetCurrentThreadIDs(std::vector< lldb::tid_t > &thread_ids, bool &sequence_mutex_unavailable)
Status Detach(bool keep_stopped, lldb::pid_t pid=LLDB_INVALID_PROCESS_ID)
int SetDisableASLR(bool enable)
Sets the disable ASLR flag to enable for a process that will be launched with the 'A' packet.
Status GetMemoryRegionInfo(lldb::addr_t addr, MemoryRegionInfo &range_info)
int SendStdinNotification(const char *data, size_t data_len)
Sends a GDB remote protocol 'I' packet that delivers stdin data to the remote process.
void AutoCompleteDiskFileOrDirectory(CompletionRequest &request, bool only_dir)
lldb::pid_t m_curr_pid_run
Current gdb remote protocol process identifier for continue, step, etc.
void MaybeEnableCompression(llvm::ArrayRef< llvm::StringRef > supported_compressions)
llvm::Expected< TraceSupportedResponse > SendTraceSupported(std::chrono::seconds interrupt_timeout)
llvm::Error SendTraceStart(const llvm::json::Value &request, std::chrono::seconds interrupt_timeout)
bool GetModuleInfo(const FileSpec &module_file_spec, const ArchSpec &arch_spec, ModuleSpec &module_spec)
std::optional< PidTid > SendSetCurrentThreadPacket(uint64_t tid, uint64_t pid, char op)
Status GetFilePermissions(const FileSpec &file_spec, uint32_t &file_permissions)
uint32_t FindProcesses(const ProcessInstanceInfoMatch &process_match_info, ProcessInstanceInfoList &process_infos)
lldb::DataBufferSP ReadMemoryTags(lldb::addr_t addr, size_t len, int32_t type)
int SetWorkingDir(const FileSpec &working_dir)
Sets the working directory to path for a process that will be launched with the 'A' packet for non pl...
Status ConfigureRemoteStructuredData(ConstString type_name, const StructuredData::ObjectSP &config_sp)
Configure a StructuredData feature on the remote end.
std::vector< std::pair< lldb::pid_t, lldb::tid_t > > GetCurrentProcessAndThreadIDs(bool &sequence_mutex_unavailable)
bool GetThreadStopInfo(lldb::tid_t tid, StringExtractorGDBRemote &response)
bool GetProcessStandaloneBinary(UUID &uuid, lldb::addr_t &value, bool &value_is_offset)
int SendEnvironmentPacket(char const *name_equal_value)
Sends a "QEnvironment:NAME=VALUE" packet that will build up the environment that will get used when l...
#define LLDB_INVALID_THREAD_ID
Definition: lldb-defines.h:82
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:74
#define UINT32_MAX
Definition: lldb-defines.h:19
#define LLDB_INVALID_PROCESS_ID
Definition: lldb-defines.h:81
llvm::raw_ostream & operator<<(llvm::raw_ostream &os, const QOffsets &offsets)
bool operator==(const QOffsets &a, const QOffsets &b)
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
std::vector< ProcessInstanceInfo > ProcessInstanceInfoList
Definition: Host.h:32
uint64_t pid_t
Definition: lldb-types.h:81
uint64_t user_id_t
Definition: lldb-types.h:80
uint64_t addr_t
Definition: lldb-types.h:79
uint64_t tid_t
Definition: lldb-types.h:82
jLLDBTraceGetBinaryData gdb-remote packet
jLLDBTraceStop gdb-remote packet
The offsets used by the target when relocating the executable.
bool segments
If true, the offsets field describes segments.
std::vector< uint64_t > offsets
The individual offsets.