blob: 564afbb2911cf68fd9bfac3cfe26cc13a7d60805 [file] [log] [blame]
Greg Clayton576d8832011-03-22 04:00:09 +00001//===-- GDBRemoteCommunicationClient.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_GDBRemoteCommunicationClient_h_
11#define liblldb_GDBRemoteCommunicationClient_h_
12
13// C Includes
14// C++ Includes
Greg Claytonadc00cb2011-05-20 23:38:13 +000015#include <vector>
16
Greg Clayton576d8832011-03-22 04:00:09 +000017// Other libraries and framework includes
18// Project includes
19#include "lldb/Core/ArchSpec.h"
Greg Clayton46fb5582011-11-18 07:03:08 +000020#include "lldb/Target/Process.h"
Greg Clayton576d8832011-03-22 04:00:09 +000021
22#include "GDBRemoteCommunication.h"
23
Greg Clayton8b82f082011-04-12 05:54:46 +000024typedef enum
25{
26 eBreakpointSoftware = 0,
27 eBreakpointHardware,
28 eWatchpointWrite,
29 eWatchpointRead,
30 eWatchpointReadWrite
31} GDBStoppointType;
32
Greg Clayton576d8832011-03-22 04:00:09 +000033class GDBRemoteCommunicationClient : public GDBRemoteCommunication
34{
35public:
36 //------------------------------------------------------------------
37 // Constructors and Destructors
38 //------------------------------------------------------------------
Greg Clayton8b82f082011-04-12 05:54:46 +000039 GDBRemoteCommunicationClient(bool is_platform);
Greg Clayton576d8832011-03-22 04:00:09 +000040
Greg Clayton576d8832011-03-22 04:00:09 +000041 ~GDBRemoteCommunicationClient();
42
Greg Clayton1cb64962011-03-24 04:28:38 +000043 //------------------------------------------------------------------
44 // After connecting, send the handshake to the server to make sure
45 // we are communicating with it.
46 //------------------------------------------------------------------
47 bool
48 HandshakeWithServer (lldb_private::Error *error_ptr);
49
Greg Clayton576d8832011-03-22 04:00:09 +000050 size_t
51 SendPacketAndWaitForResponse (const char *send_payload,
52 StringExtractorGDBRemote &response,
53 bool send_async);
54
55 size_t
56 SendPacketAndWaitForResponse (const char *send_payload,
57 size_t send_length,
58 StringExtractorGDBRemote &response,
59 bool send_async);
60
61 lldb::StateType
62 SendContinuePacketAndWaitForResponse (ProcessGDBRemote *process,
63 const char *packet_payload,
64 size_t packet_length,
65 StringExtractorGDBRemote &response);
66
Greg Claytonfbb76342013-11-20 21:07:01 +000067 bool
Greg Clayton576d8832011-03-22 04:00:09 +000068 GetThreadSuffixSupported ();
69
Greg Claytonfb909312013-11-23 01:58:15 +000070 // This packet is usually sent first and the boolean return value
71 // indicates if the packet was send and any response was received
72 // even in the response is UNIMPLEMENTED. If the packet failed to
73 // get a response, then false is returned. This quickly tells us
74 // if we were able to connect and communicte with the remote GDB
75 // server
76 bool
Greg Clayton1cb64962011-03-24 04:28:38 +000077 QueryNoAckModeSupported ();
Greg Clayton576d8832011-03-22 04:00:09 +000078
Greg Clayton44633992012-04-10 03:22:03 +000079 void
80 GetListThreadsInStopReplySupported ();
81
Greg Clayton576d8832011-03-22 04:00:09 +000082 bool
83 SendAsyncSignal (int signo);
84
85 bool
86 SendInterrupt (lldb_private::Mutex::Locker &locker,
87 uint32_t seconds_to_wait_for_stop,
Greg Clayton576d8832011-03-22 04:00:09 +000088 bool &timed_out);
89
90 lldb::pid_t
91 GetCurrentProcessID ();
92
93 bool
94 GetLaunchSuccess (std::string &error_str);
95
Greg Clayton8b82f082011-04-12 05:54:46 +000096 uint16_t
Daniel Maleae0f8f572013-08-26 23:57:52 +000097 LaunchGDBserverAndGetPort (lldb::pid_t &pid);
98
99 bool
100 KillSpawnedProcess (lldb::pid_t pid);
Greg Clayton8b82f082011-04-12 05:54:46 +0000101
Greg Clayton576d8832011-03-22 04:00:09 +0000102 //------------------------------------------------------------------
103 /// Sends a GDB remote protocol 'A' packet that delivers program
104 /// arguments to the remote server.
105 ///
106 /// @param[in] argv
107 /// A NULL terminated array of const C strings to use as the
108 /// arguments.
109 ///
110 /// @return
111 /// Zero if the response was "OK", a positive value if the
112 /// the response was "Exx" where xx are two hex digits, or
113 /// -1 if the call is unsupported or any other unexpected
114 /// response was received.
115 //------------------------------------------------------------------
116 int
Greg Claytonfbb76342013-11-20 21:07:01 +0000117 SendArgumentsPacket (const lldb_private::ProcessLaunchInfo &launch_info);
Greg Clayton576d8832011-03-22 04:00:09 +0000118
119 //------------------------------------------------------------------
120 /// Sends a "QEnvironment:NAME=VALUE" packet that will build up the
121 /// environment that will get used when launching an application
122 /// in conjunction with the 'A' packet. This function can be called
123 /// multiple times in a row in order to pass on the desired
124 /// environment that the inferior should be launched with.
125 ///
126 /// @param[in] name_equal_value
127 /// A NULL terminated C string that contains a single environment
128 /// in the format "NAME=VALUE".
129 ///
130 /// @return
131 /// Zero if the response was "OK", a positive value if the
132 /// the response was "Exx" where xx are two hex digits, or
133 /// -1 if the call is unsupported or any other unexpected
134 /// response was received.
135 //------------------------------------------------------------------
136 int
137 SendEnvironmentPacket (char const *name_equal_value);
138
Greg Claytonc4103b32011-05-08 04:53:50 +0000139 int
140 SendLaunchArchPacket (const char *arch);
Greg Clayton576d8832011-03-22 04:00:09 +0000141 //------------------------------------------------------------------
142 /// Sends a "vAttach:PID" where PID is in hex.
143 ///
144 /// @param[in] pid
145 /// A process ID for the remote gdb server to attach to.
146 ///
147 /// @param[out] response
148 /// The response received from the gdb server. If the return
149 /// value is zero, \a response will contain a stop reply
150 /// packet.
151 ///
152 /// @return
153 /// Zero if the attach was successful, or an error indicating
154 /// an error code.
155 //------------------------------------------------------------------
156 int
157 SendAttach (lldb::pid_t pid,
158 StringExtractorGDBRemote& response);
159
160
161 //------------------------------------------------------------------
162 /// Sets the path to use for stdin/out/err for a process
163 /// that will be launched with the 'A' packet.
164 ///
165 /// @param[in] path
166 /// The path to use for stdin/out/err
167 ///
168 /// @return
169 /// Zero if the for success, or an error code for failure.
170 //------------------------------------------------------------------
171 int
172 SetSTDIN (char const *path);
173 int
174 SetSTDOUT (char const *path);
175 int
176 SetSTDERR (char const *path);
177
178 //------------------------------------------------------------------
179 /// Sets the disable ASLR flag to \a enable for a process that will
180 /// be launched with the 'A' packet.
181 ///
182 /// @param[in] enable
183 /// A boolean value indicating wether to disable ASLR or not.
184 ///
185 /// @return
186 /// Zero if the for success, or an error code for failure.
187 //------------------------------------------------------------------
188 int
189 SetDisableASLR (bool enable);
190
191 //------------------------------------------------------------------
192 /// Sets the working directory to \a path for a process that will
Greg Claytonfbb76342013-11-20 21:07:01 +0000193 /// be launched with the 'A' packet for non platform based
194 /// connections. If this packet is sent to a GDB server that
195 /// implements the platform, it will change the current working
196 /// directory for the platform process.
Greg Clayton576d8832011-03-22 04:00:09 +0000197 ///
198 /// @param[in] path
199 /// The path to a directory to use when launching our processs
200 ///
201 /// @return
202 /// Zero if the for success, or an error code for failure.
203 //------------------------------------------------------------------
204 int
205 SetWorkingDir (char const *path);
206
Greg Claytonfbb76342013-11-20 21:07:01 +0000207 //------------------------------------------------------------------
208 /// Gets the current working directory of a remote platform GDB
209 /// server.
210 ///
211 /// @param[out] cwd
212 /// The current working directory on the remote platform.
213 ///
214 /// @return
215 /// Boolean for success
216 //------------------------------------------------------------------
217 bool
218 GetWorkingDir (std::string &cwd);
219
Greg Clayton576d8832011-03-22 04:00:09 +0000220 lldb::addr_t
221 AllocateMemory (size_t size, uint32_t permissions);
222
223 bool
224 DeallocateMemory (lldb::addr_t addr);
225
Jim Inghamacff8952013-05-02 00:27:30 +0000226 lldb_private::Error
227 Detach (bool keep_stopped);
Greg Clayton37a0a242012-04-11 00:24:49 +0000228
Greg Clayton46fb5582011-11-18 07:03:08 +0000229 lldb_private::Error
230 GetMemoryRegionInfo (lldb::addr_t addr,
231 lldb_private::MemoryRegionInfo &range_info);
232
Johnny Chen64637202012-05-23 21:09:52 +0000233 lldb_private::Error
234 GetWatchpointSupportInfo (uint32_t &num);
235
Enrico Granataf04a2192012-07-13 23:18:48 +0000236 lldb_private::Error
237 GetWatchpointSupportInfo (uint32_t &num, bool& after);
238
239 lldb_private::Error
240 GetWatchpointsTriggerAfterInstruction (bool &after);
241
Greg Clayton576d8832011-03-22 04:00:09 +0000242 const lldb_private::ArchSpec &
243 GetHostArchitecture ();
Greg Clayton9ac6d2d2013-10-25 18:13:17 +0000244
245 uint32_t
246 GetHostDefaultPacketTimeout();
Jason Molendaf17b5ac2012-12-19 02:54:03 +0000247
248 const lldb_private::ArchSpec &
249 GetProcessArchitecture ();
250
Greg Clayton576d8832011-03-22 04:00:09 +0000251 bool
252 GetVContSupported (char flavor);
253
Jim Inghamcd16df92012-07-20 21:37:13 +0000254 bool
Sean Callananb1de1142013-09-04 23:24:15 +0000255 GetpPacketSupported (lldb::tid_t tid);
Hafiz Abid Qadeer9a78cdf2013-08-29 09:09:45 +0000256
257 bool
Jim Inghamcd16df92012-07-20 21:37:13 +0000258 GetVAttachOrWaitSupported ();
259
Jim Ingham279ceec2012-07-25 21:12:43 +0000260 bool
261 GetSyncThreadStateSupported();
262
Greg Clayton576d8832011-03-22 04:00:09 +0000263 void
264 ResetDiscoverableSettings();
265
266 bool
Greg Clayton9b1e1cd2011-04-04 18:18:57 +0000267 GetHostInfo (bool force = false);
Greg Clayton576d8832011-03-22 04:00:09 +0000268
269 bool
Greg Clayton1cb64962011-03-24 04:28:38 +0000270 GetOSVersion (uint32_t &major,
271 uint32_t &minor,
272 uint32_t &update);
273
274 bool
275 GetOSBuildString (std::string &s);
276
277 bool
278 GetOSKernelDescription (std::string &s);
279
280 lldb_private::ArchSpec
281 GetSystemArchitecture ();
282
283 bool
284 GetHostname (std::string &s);
285
Greg Clayton37a0a242012-04-11 00:24:49 +0000286 lldb::addr_t
287 GetShlibInfoAddr();
288
Greg Clayton1cb64962011-03-24 04:28:38 +0000289 bool
Greg Clayton576d8832011-03-22 04:00:09 +0000290 GetSupportsThreadSuffix ();
291
292 bool
Greg Clayton32e0a752011-03-30 18:16:51 +0000293 GetProcessInfo (lldb::pid_t pid,
Greg Clayton8b82f082011-04-12 05:54:46 +0000294 lldb_private::ProcessInstanceInfo &process_info);
Greg Clayton32e0a752011-03-30 18:16:51 +0000295
296 uint32_t
Greg Clayton8b82f082011-04-12 05:54:46 +0000297 FindProcesses (const lldb_private::ProcessInstanceInfoMatch &process_match_info,
298 lldb_private::ProcessInstanceInfoList &process_infos);
Greg Clayton32e0a752011-03-30 18:16:51 +0000299
300 bool
301 GetUserName (uint32_t uid, std::string &name);
302
303 bool
304 GetGroupName (uint32_t gid, std::string &name);
305
306 bool
Greg Clayton576d8832011-03-22 04:00:09 +0000307 HasFullVContSupport ()
308 {
309 return GetVContSupported ('A');
310 }
311
312 bool
313 HasAnyVContSupport ()
314 {
315 return GetVContSupported ('a');
316 }
317
Greg Clayton8b82f082011-04-12 05:54:46 +0000318 bool
319 GetStopReply (StringExtractorGDBRemote &response);
320
321 bool
Greg Claytonf402f782012-10-13 02:11:55 +0000322 GetThreadStopInfo (lldb::tid_t tid,
Greg Clayton8b82f082011-04-12 05:54:46 +0000323 StringExtractorGDBRemote &response);
324
325 bool
326 SupportsGDBStoppointPacket (GDBStoppointType type)
327 {
328 switch (type)
329 {
330 case eBreakpointSoftware: return m_supports_z0;
331 case eBreakpointHardware: return m_supports_z1;
332 case eWatchpointWrite: return m_supports_z2;
333 case eWatchpointRead: return m_supports_z3;
334 case eWatchpointReadWrite: return m_supports_z4;
Greg Clayton8b82f082011-04-12 05:54:46 +0000335 }
336 return false;
337 }
338 uint8_t
339 SendGDBStoppointTypePacket (GDBStoppointType type, // Type of breakpoint or watchpoint
340 bool insert, // Insert or remove?
341 lldb::addr_t addr, // Address of breakpoint or watchpoint
342 uint32_t length); // Byte Size of breakpoint or watchpoint
343
Greg Clayton9b1e1cd2011-04-04 18:18:57 +0000344 void
345 TestPacketSpeed (const uint32_t num_packets);
346
347 // This packet is for testing the speed of the interface only. Both
348 // the client and server need to support it, but this allows us to
349 // measure the packet speed without any other work being done on the
350 // other end and avoids any of that work affecting the packet send
351 // and response times.
352 bool
353 SendSpeedTestPacket (uint32_t send_size,
354 uint32_t recv_size);
Greg Clayton8b82f082011-04-12 05:54:46 +0000355
356 bool
Jason Molendae9ca4af2013-02-23 02:04:45 +0000357 SetCurrentThread (uint64_t tid);
Greg Clayton8b82f082011-04-12 05:54:46 +0000358
359 bool
Jason Molendae9ca4af2013-02-23 02:04:45 +0000360 SetCurrentThreadForRun (uint64_t tid);
Greg Clayton8b82f082011-04-12 05:54:46 +0000361
Greg Clayton2a48f522011-05-14 01:50:35 +0000362 lldb_private::LazyBool
Jim Ingham372787f2012-04-07 00:00:41 +0000363 SupportsAllocDeallocMemory () // const
Greg Clayton2a48f522011-05-14 01:50:35 +0000364 {
Jim Ingham372787f2012-04-07 00:00:41 +0000365 // Uncomment this to have lldb pretend the debug server doesn't respond to alloc/dealloc memory packets.
366 // m_supports_alloc_dealloc_memory = lldb_private::eLazyBoolNo;
Greg Clayton70b57652011-05-15 01:25:55 +0000367 return m_supports_alloc_dealloc_memory;
Greg Clayton2a48f522011-05-14 01:50:35 +0000368 }
369
Greg Claytonadc00cb2011-05-20 23:38:13 +0000370 size_t
371 GetCurrentThreadIDs (std::vector<lldb::tid_t> &thread_ids,
372 bool &sequence_mutex_unavailable);
373
Greg Clayton2687cd12012-03-29 01:55:41 +0000374 bool
375 GetInterruptWasSent () const
376 {
377 return m_interrupt_sent;
378 }
Han Ming Ong4b6459f2013-01-18 23:11:53 +0000379
Greg Claytonfbb76342013-11-20 21:07:01 +0000380 lldb::user_id_t
Daniel Maleae0f8f572013-08-26 23:57:52 +0000381 OpenFile (const lldb_private::FileSpec& file_spec,
382 uint32_t flags,
383 mode_t mode,
384 lldb_private::Error &error);
385
Greg Claytonfbb76342013-11-20 21:07:01 +0000386 bool
Daniel Maleae0f8f572013-08-26 23:57:52 +0000387 CloseFile (lldb::user_id_t fd,
388 lldb_private::Error &error);
389
Greg Claytonfbb76342013-11-20 21:07:01 +0000390 lldb::user_id_t
Daniel Maleae0f8f572013-08-26 23:57:52 +0000391 GetFileSize (const lldb_private::FileSpec& file_spec);
392
Greg Claytonfbb76342013-11-20 21:07:01 +0000393 lldb_private::Error
394 GetFilePermissions(const char *path, uint32_t &file_permissions);
Daniel Maleae0f8f572013-08-26 23:57:52 +0000395
Greg Claytonfbb76342013-11-20 21:07:01 +0000396 lldb_private::Error
397 SetFilePermissions(const char *path, uint32_t file_permissions);
398
399 uint64_t
Daniel Maleae0f8f572013-08-26 23:57:52 +0000400 ReadFile (lldb::user_id_t fd,
401 uint64_t offset,
402 void *dst,
403 uint64_t dst_len,
404 lldb_private::Error &error);
405
Greg Claytonfbb76342013-11-20 21:07:01 +0000406 uint64_t
Daniel Maleae0f8f572013-08-26 23:57:52 +0000407 WriteFile (lldb::user_id_t fd,
408 uint64_t offset,
409 const void* src,
410 uint64_t src_len,
411 lldb_private::Error &error);
412
Greg Claytonfbb76342013-11-20 21:07:01 +0000413 lldb_private::Error
414 CreateSymlink (const char *src,
415 const char *dst);
Daniel Maleae0f8f572013-08-26 23:57:52 +0000416
Greg Claytonfbb76342013-11-20 21:07:01 +0000417 lldb_private::Error
418 Unlink (const char *path);
419
420 lldb_private::Error
421 MakeDirectory (const char *path,
422 uint32_t mode);
423
424 bool
Daniel Maleae0f8f572013-08-26 23:57:52 +0000425 GetFileExists (const lldb_private::FileSpec& file_spec);
426
Greg Claytonfbb76342013-11-20 21:07:01 +0000427 lldb_private::Error
Daniel Maleae0f8f572013-08-26 23:57:52 +0000428 RunShellCommand (const char *command, // Shouldn't be NULL
429 const char *working_dir, // Pass NULL to use the current working directory
430 int *status_ptr, // Pass NULL if you don't want the process exit status
431 int *signo_ptr, // Pass NULL if you don't want the signal that caused the process to exit
432 std::string *command_output, // Pass NULL if you don't want the command output
433 uint32_t timeout_sec); // Timeout in seconds to wait for shell program to finish
434
Greg Claytonfbb76342013-11-20 21:07:01 +0000435 bool
Daniel Maleae0f8f572013-08-26 23:57:52 +0000436 CalculateMD5 (const lldb_private::FileSpec& file_spec,
437 uint64_t &high,
438 uint64_t &low);
439
Han Ming Ong4b6459f2013-01-18 23:11:53 +0000440 std::string
441 HarmonizeThreadIdsForProfileData (ProcessGDBRemote *process,
442 StringExtractorGDBRemote &inputStringExtractor);
Daniel Maleae0f8f572013-08-26 23:57:52 +0000443
Greg Claytonf74cf862013-11-13 23:28:31 +0000444 bool
445 ReadRegister(lldb::tid_t tid,
446 uint32_t reg_num,
447 StringExtractorGDBRemote &response);
448
449 bool
450 ReadAllRegisters (lldb::tid_t tid,
451 StringExtractorGDBRemote &response);
452
453 bool
454 SaveRegisterState (lldb::tid_t tid, uint32_t &save_id);
455
456 bool
457 RestoreRegisterState (lldb::tid_t tid, uint32_t save_id);
458
Greg Clayton576d8832011-03-22 04:00:09 +0000459protected:
460
Jason Molendaf17b5ac2012-12-19 02:54:03 +0000461 bool
462 GetCurrentProcessInfo ();
463
Greg Clayton576d8832011-03-22 04:00:09 +0000464 //------------------------------------------------------------------
465 // Classes that inherit from GDBRemoteCommunicationClient can see and modify these
466 //------------------------------------------------------------------
Greg Claytone0d378b2011-03-24 21:19:54 +0000467 lldb_private::LazyBool m_supports_not_sending_acks;
468 lldb_private::LazyBool m_supports_thread_suffix;
Greg Clayton44633992012-04-10 03:22:03 +0000469 lldb_private::LazyBool m_supports_threads_in_stop_reply;
Greg Claytone0d378b2011-03-24 21:19:54 +0000470 lldb_private::LazyBool m_supports_vCont_all;
471 lldb_private::LazyBool m_supports_vCont_any;
472 lldb_private::LazyBool m_supports_vCont_c;
473 lldb_private::LazyBool m_supports_vCont_C;
474 lldb_private::LazyBool m_supports_vCont_s;
475 lldb_private::LazyBool m_supports_vCont_S;
Greg Clayton32e0a752011-03-30 18:16:51 +0000476 lldb_private::LazyBool m_qHostInfo_is_valid;
Jason Molendaf17b5ac2012-12-19 02:54:03 +0000477 lldb_private::LazyBool m_qProcessInfo_is_valid;
Greg Clayton70b57652011-05-15 01:25:55 +0000478 lldb_private::LazyBool m_supports_alloc_dealloc_memory;
Greg Clayton46fb5582011-11-18 07:03:08 +0000479 lldb_private::LazyBool m_supports_memory_region_info;
Johnny Chen64637202012-05-23 21:09:52 +0000480 lldb_private::LazyBool m_supports_watchpoint_support_info;
Jim Inghamacff8952013-05-02 00:27:30 +0000481 lldb_private::LazyBool m_supports_detach_stay_stopped;
Enrico Granataf04a2192012-07-13 23:18:48 +0000482 lldb_private::LazyBool m_watchpoints_trigger_after_instruction;
Jim Inghamcd16df92012-07-20 21:37:13 +0000483 lldb_private::LazyBool m_attach_or_wait_reply;
Jim Ingham279ceec2012-07-25 21:12:43 +0000484 lldb_private::LazyBool m_prepare_for_reg_writing_reply;
Hafiz Abid Qadeer9a78cdf2013-08-29 09:09:45 +0000485 lldb_private::LazyBool m_supports_p;
Greg Claytonf74cf862013-11-13 23:28:31 +0000486 lldb_private::LazyBool m_supports_QSaveRegisterState;
Jim Inghamcd16df92012-07-20 21:37:13 +0000487
Greg Clayton8b82f082011-04-12 05:54:46 +0000488 bool
489 m_supports_qProcessInfoPID:1,
490 m_supports_qfProcessInfo:1,
491 m_supports_qUserName:1,
492 m_supports_qGroupName:1,
493 m_supports_qThreadStopInfo:1,
494 m_supports_z0:1,
495 m_supports_z1:1,
496 m_supports_z2:1,
497 m_supports_z3:1,
Greg Clayton89600582013-10-10 17:53:50 +0000498 m_supports_z4:1,
499 m_supports_QEnvironment:1,
500 m_supports_QEnvironmentHexEncoded:1;
Greg Clayton2a48f522011-05-14 01:50:35 +0000501
Greg Clayton8b82f082011-04-12 05:54:46 +0000502
503 lldb::tid_t m_curr_tid; // Current gdb remote protocol thread index for all other operations
504 lldb::tid_t m_curr_tid_run; // Current gdb remote protocol thread index for continue, step, etc
505
Greg Clayton576d8832011-03-22 04:00:09 +0000506
Johnny Chen64637202012-05-23 21:09:52 +0000507 uint32_t m_num_supported_hardware_watchpoints;
508
Greg Clayton576d8832011-03-22 04:00:09 +0000509 // If we need to send a packet while the target is running, the m_async_XXX
510 // member variables take care of making this happen.
511 lldb_private::Mutex m_async_mutex;
512 lldb_private::Predicate<bool> m_async_packet_predicate;
513 std::string m_async_packet;
514 StringExtractorGDBRemote m_async_response;
515 int m_async_signal; // We were asked to deliver a signal to the inferior process.
Greg Clayton2687cd12012-03-29 01:55:41 +0000516 bool m_interrupt_sent;
Han Ming Ong4b6459f2013-01-18 23:11:53 +0000517 std::string m_partial_profile_data;
518 std::map<uint64_t, uint32_t> m_thread_id_to_used_usec_map;
Greg Clayton576d8832011-03-22 04:00:09 +0000519
Greg Claytond314e812011-03-23 00:09:55 +0000520 lldb_private::ArchSpec m_host_arch;
Jason Molendaf17b5ac2012-12-19 02:54:03 +0000521 lldb_private::ArchSpec m_process_arch;
Greg Clayton1cb64962011-03-24 04:28:38 +0000522 uint32_t m_os_version_major;
523 uint32_t m_os_version_minor;
524 uint32_t m_os_version_update;
525 std::string m_os_build;
526 std::string m_os_kernel;
527 std::string m_hostname;
Greg Clayton9ac6d2d2013-10-25 18:13:17 +0000528 uint32_t m_default_packet_timeout;
Greg Clayton576d8832011-03-22 04:00:09 +0000529
Greg Clayton32e0a752011-03-30 18:16:51 +0000530 bool
531 DecodeProcessInfoResponse (StringExtractorGDBRemote &response,
Greg Clayton8b82f082011-04-12 05:54:46 +0000532 lldb_private::ProcessInstanceInfo &process_info);
Greg Clayton576d8832011-03-22 04:00:09 +0000533private:
534 //------------------------------------------------------------------
535 // For GDBRemoteCommunicationClient only
536 //------------------------------------------------------------------
537 DISALLOW_COPY_AND_ASSIGN (GDBRemoteCommunicationClient);
538};
539
540#endif // liblldb_GDBRemoteCommunicationClient_h_