Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 1 | //===-- 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 Clayton | adc00cb | 2011-05-20 23:38:13 +0000 | [diff] [blame] | 15 | #include <vector> |
| 16 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 17 | // Other libraries and framework includes |
| 18 | // Project includes |
| 19 | #include "lldb/Core/ArchSpec.h" |
Greg Clayton | 46fb558 | 2011-11-18 07:03:08 +0000 | [diff] [blame] | 20 | #include "lldb/Target/Process.h" |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 21 | |
| 22 | #include "GDBRemoteCommunication.h" |
| 23 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 24 | namespace lldb_private { |
| 25 | namespace process_gdb_remote { |
| 26 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 27 | class GDBRemoteCommunicationClient : public GDBRemoteCommunication |
| 28 | { |
| 29 | public: |
| 30 | //------------------------------------------------------------------ |
| 31 | // Constructors and Destructors |
| 32 | //------------------------------------------------------------------ |
Tamas Berghammer | e13c273 | 2015-02-11 10:29:30 +0000 | [diff] [blame] | 33 | GDBRemoteCommunicationClient(); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 34 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 35 | ~GDBRemoteCommunicationClient(); |
| 36 | |
Greg Clayton | 1cb6496 | 2011-03-24 04:28:38 +0000 | [diff] [blame] | 37 | //------------------------------------------------------------------ |
| 38 | // After connecting, send the handshake to the server to make sure |
| 39 | // we are communicating with it. |
| 40 | //------------------------------------------------------------------ |
| 41 | bool |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 42 | HandshakeWithServer (Error *error_ptr); |
Greg Clayton | 1cb6496 | 2011-03-24 04:28:38 +0000 | [diff] [blame] | 43 | |
Greg Clayton | 3dedae1 | 2013-12-06 21:45:27 +0000 | [diff] [blame] | 44 | PacketResult |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 45 | SendPacketAndWaitForResponse (const char *send_payload, |
| 46 | StringExtractorGDBRemote &response, |
| 47 | bool send_async); |
| 48 | |
Greg Clayton | 3dedae1 | 2013-12-06 21:45:27 +0000 | [diff] [blame] | 49 | PacketResult |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 50 | SendPacketAndWaitForResponse (const char *send_payload, |
| 51 | size_t send_length, |
| 52 | StringExtractorGDBRemote &response, |
| 53 | bool send_async); |
| 54 | |
Steve Pucci | 5ae54ae | 2014-01-25 05:46:51 +0000 | [diff] [blame] | 55 | // For packets which specify a range of output to be returned, |
| 56 | // return all of the output via a series of request packets of the form |
| 57 | // <prefix>0,<size> |
| 58 | // <prefix><size>,<size> |
| 59 | // <prefix><size>*2,<size> |
| 60 | // <prefix><size>*3,<size> |
| 61 | // ... |
| 62 | // until a "$l..." packet is received, indicating the end. |
| 63 | // (size is in hex; this format is used by a standard gdbserver to |
| 64 | // return the given portion of the output specified by <prefix>; |
| 65 | // for example, "qXfer:libraries-svr4:read::fff,1000" means |
| 66 | // "return a chunk of the xml description file for shared |
| 67 | // library load addresses, where the chunk starts at offset 0xfff |
| 68 | // and continues for 0x1000 bytes"). |
| 69 | // Concatenate the resulting server response packets together and |
| 70 | // return in response_string. If any packet fails, the return value |
| 71 | // indicates that failure and the returned string value is undefined. |
| 72 | PacketResult |
| 73 | SendPacketsAndConcatenateResponses (const char *send_payload_prefix, |
| 74 | std::string &response_string); |
| 75 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 76 | lldb::StateType |
| 77 | SendContinuePacketAndWaitForResponse (ProcessGDBRemote *process, |
| 78 | const char *packet_payload, |
| 79 | size_t packet_length, |
| 80 | StringExtractorGDBRemote &response); |
| 81 | |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 82 | bool |
Tamas Berghammer | 30b8cd3 | 2015-03-23 15:50:03 +0000 | [diff] [blame] | 83 | GetThreadSuffixSupported () override; |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 84 | |
Greg Clayton | fb90931 | 2013-11-23 01:58:15 +0000 | [diff] [blame] | 85 | // This packet is usually sent first and the boolean return value |
| 86 | // indicates if the packet was send and any response was received |
| 87 | // even in the response is UNIMPLEMENTED. If the packet failed to |
| 88 | // get a response, then false is returned. This quickly tells us |
Bruce Mitchener | d93c4a3 | 2014-07-01 21:22:11 +0000 | [diff] [blame] | 89 | // if we were able to connect and communicate with the remote GDB |
Greg Clayton | fb90931 | 2013-11-23 01:58:15 +0000 | [diff] [blame] | 90 | // server |
| 91 | bool |
Greg Clayton | 1cb6496 | 2011-03-24 04:28:38 +0000 | [diff] [blame] | 92 | QueryNoAckModeSupported (); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 93 | |
Greg Clayton | 4463399 | 2012-04-10 03:22:03 +0000 | [diff] [blame] | 94 | void |
| 95 | GetListThreadsInStopReplySupported (); |
| 96 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 97 | bool |
| 98 | SendAsyncSignal (int signo); |
| 99 | |
| 100 | bool |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 101 | SendInterrupt (Mutex::Locker &locker, |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 102 | uint32_t seconds_to_wait_for_stop, |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 103 | bool &timed_out); |
| 104 | |
| 105 | lldb::pid_t |
Oleksiy Vyalov | 1ef7b2c | 2015-02-04 23:19:15 +0000 | [diff] [blame] | 106 | GetCurrentProcessID (bool allow_lazy = true); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 107 | |
| 108 | bool |
| 109 | GetLaunchSuccess (std::string &error_str); |
| 110 | |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 111 | uint16_t |
Greg Clayton | dbf0457 | 2013-12-04 19:40:33 +0000 | [diff] [blame] | 112 | LaunchGDBserverAndGetPort (lldb::pid_t &pid, const char *remote_accept_hostname); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 113 | |
| 114 | bool |
| 115 | KillSpawnedProcess (lldb::pid_t pid); |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 116 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 117 | //------------------------------------------------------------------ |
| 118 | /// Sends a GDB remote protocol 'A' packet that delivers program |
| 119 | /// arguments to the remote server. |
| 120 | /// |
| 121 | /// @param[in] argv |
| 122 | /// A NULL terminated array of const C strings to use as the |
| 123 | /// arguments. |
| 124 | /// |
| 125 | /// @return |
| 126 | /// Zero if the response was "OK", a positive value if the |
| 127 | /// the response was "Exx" where xx are two hex digits, or |
| 128 | /// -1 if the call is unsupported or any other unexpected |
| 129 | /// response was received. |
| 130 | //------------------------------------------------------------------ |
| 131 | int |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 132 | SendArgumentsPacket (const ProcessLaunchInfo &launch_info); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 133 | |
| 134 | //------------------------------------------------------------------ |
| 135 | /// Sends a "QEnvironment:NAME=VALUE" packet that will build up the |
| 136 | /// environment that will get used when launching an application |
| 137 | /// in conjunction with the 'A' packet. This function can be called |
| 138 | /// multiple times in a row in order to pass on the desired |
| 139 | /// environment that the inferior should be launched with. |
| 140 | /// |
| 141 | /// @param[in] name_equal_value |
| 142 | /// A NULL terminated C string that contains a single environment |
| 143 | /// in the format "NAME=VALUE". |
| 144 | /// |
| 145 | /// @return |
| 146 | /// Zero if the response was "OK", a positive value if the |
| 147 | /// the response was "Exx" where xx are two hex digits, or |
| 148 | /// -1 if the call is unsupported or any other unexpected |
| 149 | /// response was received. |
| 150 | //------------------------------------------------------------------ |
| 151 | int |
| 152 | SendEnvironmentPacket (char const *name_equal_value); |
| 153 | |
Greg Clayton | c4103b3 | 2011-05-08 04:53:50 +0000 | [diff] [blame] | 154 | int |
| 155 | SendLaunchArchPacket (const char *arch); |
Jason Molenda | a332978 | 2014-03-29 18:54:20 +0000 | [diff] [blame] | 156 | |
| 157 | int |
| 158 | SendLaunchEventDataPacket (const char *data, bool *was_supported = NULL); |
| 159 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 160 | //------------------------------------------------------------------ |
| 161 | /// Sends a "vAttach:PID" where PID is in hex. |
| 162 | /// |
| 163 | /// @param[in] pid |
| 164 | /// A process ID for the remote gdb server to attach to. |
| 165 | /// |
| 166 | /// @param[out] response |
| 167 | /// The response received from the gdb server. If the return |
| 168 | /// value is zero, \a response will contain a stop reply |
| 169 | /// packet. |
| 170 | /// |
| 171 | /// @return |
| 172 | /// Zero if the attach was successful, or an error indicating |
| 173 | /// an error code. |
| 174 | //------------------------------------------------------------------ |
| 175 | int |
| 176 | SendAttach (lldb::pid_t pid, |
| 177 | StringExtractorGDBRemote& response); |
| 178 | |
| 179 | |
| 180 | //------------------------------------------------------------------ |
Vince Harron | e0be425 | 2015-02-06 18:32:57 +0000 | [diff] [blame] | 181 | /// Sends a GDB remote protocol 'I' packet that delivers stdin |
| 182 | /// data to the remote process. |
| 183 | /// |
| 184 | /// @param[in] data |
| 185 | /// A pointer to stdin data. |
| 186 | /// |
| 187 | /// @param[in] data_len |
| 188 | /// The number of bytes available at \a data. |
| 189 | /// |
| 190 | /// @return |
| 191 | /// Zero if the attach was successful, or an error indicating |
| 192 | /// an error code. |
| 193 | //------------------------------------------------------------------ |
| 194 | int |
| 195 | SendStdinNotification(const char* data, size_t data_len); |
| 196 | |
| 197 | //------------------------------------------------------------------ |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 198 | /// Sets the path to use for stdin/out/err for a process |
| 199 | /// that will be launched with the 'A' packet. |
| 200 | /// |
| 201 | /// @param[in] path |
| 202 | /// The path to use for stdin/out/err |
| 203 | /// |
| 204 | /// @return |
| 205 | /// Zero if the for success, or an error code for failure. |
| 206 | //------------------------------------------------------------------ |
| 207 | int |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 208 | SetSTDIN(const FileSpec &file_spec); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 209 | int |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 210 | SetSTDOUT(const FileSpec &file_spec); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 211 | int |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 212 | SetSTDERR(const FileSpec &file_spec); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 213 | |
| 214 | //------------------------------------------------------------------ |
| 215 | /// Sets the disable ASLR flag to \a enable for a process that will |
| 216 | /// be launched with the 'A' packet. |
| 217 | /// |
| 218 | /// @param[in] enable |
Jim Ingham | 106d028 | 2014-06-25 02:32:56 +0000 | [diff] [blame] | 219 | /// A boolean value indicating whether to disable ASLR or not. |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 220 | /// |
| 221 | /// @return |
| 222 | /// Zero if the for success, or an error code for failure. |
| 223 | //------------------------------------------------------------------ |
| 224 | int |
| 225 | SetDisableASLR (bool enable); |
Jim Ingham | 106d028 | 2014-06-25 02:32:56 +0000 | [diff] [blame] | 226 | |
| 227 | //------------------------------------------------------------------ |
| 228 | /// Sets the DetachOnError flag to \a enable for the process controlled by the stub. |
| 229 | /// |
| 230 | /// @param[in] enable |
| 231 | /// A boolean value indicating whether to detach on error or not. |
| 232 | /// |
| 233 | /// @return |
| 234 | /// Zero if the for success, or an error code for failure. |
| 235 | //------------------------------------------------------------------ |
| 236 | int |
| 237 | SetDetachOnError (bool enable); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 238 | |
| 239 | //------------------------------------------------------------------ |
| 240 | /// Sets the working directory to \a path for a process that will |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 241 | /// be launched with the 'A' packet for non platform based |
| 242 | /// connections. If this packet is sent to a GDB server that |
| 243 | /// implements the platform, it will change the current working |
| 244 | /// directory for the platform process. |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 245 | /// |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 246 | /// @param[in] working_dir |
Bruce Mitchener | d93c4a3 | 2014-07-01 21:22:11 +0000 | [diff] [blame] | 247 | /// The path to a directory to use when launching our process |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 248 | /// |
| 249 | /// @return |
| 250 | /// Zero if the for success, or an error code for failure. |
| 251 | //------------------------------------------------------------------ |
| 252 | int |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 253 | SetWorkingDir(const FileSpec &working_dir); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 254 | |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 255 | //------------------------------------------------------------------ |
| 256 | /// Gets the current working directory of a remote platform GDB |
| 257 | /// server. |
| 258 | /// |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 259 | /// @param[out] working_dir |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 260 | /// The current working directory on the remote platform. |
| 261 | /// |
| 262 | /// @return |
| 263 | /// Boolean for success |
| 264 | //------------------------------------------------------------------ |
| 265 | bool |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 266 | GetWorkingDir(FileSpec &working_dir); |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 267 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 268 | lldb::addr_t |
| 269 | AllocateMemory (size_t size, uint32_t permissions); |
| 270 | |
| 271 | bool |
| 272 | DeallocateMemory (lldb::addr_t addr); |
| 273 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 274 | Error |
Jim Ingham | acff895 | 2013-05-02 00:27:30 +0000 | [diff] [blame] | 275 | Detach (bool keep_stopped); |
Greg Clayton | 37a0a24 | 2012-04-11 00:24:49 +0000 | [diff] [blame] | 276 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 277 | Error |
| 278 | GetMemoryRegionInfo (lldb::addr_t addr, MemoryRegionInfo &range_info); |
Greg Clayton | 46fb558 | 2011-11-18 07:03:08 +0000 | [diff] [blame] | 279 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 280 | Error |
Johnny Chen | 6463720 | 2012-05-23 21:09:52 +0000 | [diff] [blame] | 281 | GetWatchpointSupportInfo (uint32_t &num); |
| 282 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 283 | Error |
Enrico Granata | f04a219 | 2012-07-13 23:18:48 +0000 | [diff] [blame] | 284 | GetWatchpointSupportInfo (uint32_t &num, bool& after); |
| 285 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 286 | Error |
Enrico Granata | f04a219 | 2012-07-13 23:18:48 +0000 | [diff] [blame] | 287 | GetWatchpointsTriggerAfterInstruction (bool &after); |
| 288 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 289 | const ArchSpec & |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 290 | GetHostArchitecture (); |
Greg Clayton | 9ac6d2d | 2013-10-25 18:13:17 +0000 | [diff] [blame] | 291 | |
| 292 | uint32_t |
| 293 | GetHostDefaultPacketTimeout(); |
Jason Molenda | f17b5ac | 2012-12-19 02:54:03 +0000 | [diff] [blame] | 294 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 295 | const ArchSpec & |
Jason Molenda | f17b5ac | 2012-12-19 02:54:03 +0000 | [diff] [blame] | 296 | GetProcessArchitecture (); |
| 297 | |
Steve Pucci | 5ae54ae | 2014-01-25 05:46:51 +0000 | [diff] [blame] | 298 | void |
| 299 | GetRemoteQSupported(); |
| 300 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 301 | bool |
| 302 | GetVContSupported (char flavor); |
| 303 | |
Jim Ingham | cd16df9 | 2012-07-20 21:37:13 +0000 | [diff] [blame] | 304 | bool |
Sean Callanan | b1de114 | 2013-09-04 23:24:15 +0000 | [diff] [blame] | 305 | GetpPacketSupported (lldb::tid_t tid); |
Hafiz Abid Qadeer | 9a78cdf | 2013-08-29 09:09:45 +0000 | [diff] [blame] | 306 | |
| 307 | bool |
Jason Molenda | bdc4f12 | 2014-05-06 02:59:39 +0000 | [diff] [blame] | 308 | GetxPacketSupported (); |
| 309 | |
| 310 | bool |
Jim Ingham | cd16df9 | 2012-07-20 21:37:13 +0000 | [diff] [blame] | 311 | GetVAttachOrWaitSupported (); |
| 312 | |
Jim Ingham | 279ceec | 2012-07-25 21:12:43 +0000 | [diff] [blame] | 313 | bool |
| 314 | GetSyncThreadStateSupported(); |
| 315 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 316 | void |
| 317 | ResetDiscoverableSettings(); |
| 318 | |
| 319 | bool |
Greg Clayton | 9b1e1cd | 2011-04-04 18:18:57 +0000 | [diff] [blame] | 320 | GetHostInfo (bool force = false); |
Ewan Crawford | 78baa19 | 2015-05-13 09:18:18 +0000 | [diff] [blame] | 321 | |
| 322 | bool |
| 323 | GetDefaultThreadId (lldb::tid_t &tid); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 324 | |
| 325 | bool |
Greg Clayton | 1cb6496 | 2011-03-24 04:28:38 +0000 | [diff] [blame] | 326 | GetOSVersion (uint32_t &major, |
| 327 | uint32_t &minor, |
| 328 | uint32_t &update); |
| 329 | |
| 330 | bool |
| 331 | GetOSBuildString (std::string &s); |
| 332 | |
| 333 | bool |
| 334 | GetOSKernelDescription (std::string &s); |
| 335 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 336 | ArchSpec |
Greg Clayton | 1cb6496 | 2011-03-24 04:28:38 +0000 | [diff] [blame] | 337 | GetSystemArchitecture (); |
| 338 | |
| 339 | bool |
| 340 | GetHostname (std::string &s); |
| 341 | |
Greg Clayton | 37a0a24 | 2012-04-11 00:24:49 +0000 | [diff] [blame] | 342 | lldb::addr_t |
| 343 | GetShlibInfoAddr(); |
| 344 | |
Greg Clayton | 1cb6496 | 2011-03-24 04:28:38 +0000 | [diff] [blame] | 345 | bool |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 346 | GetSupportsThreadSuffix (); |
| 347 | |
| 348 | bool |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 349 | GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &process_info); |
Greg Clayton | 32e0a75 | 2011-03-30 18:16:51 +0000 | [diff] [blame] | 350 | |
| 351 | uint32_t |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 352 | FindProcesses (const ProcessInstanceInfoMatch &process_match_info, |
| 353 | ProcessInstanceInfoList &process_infos); |
Greg Clayton | 32e0a75 | 2011-03-30 18:16:51 +0000 | [diff] [blame] | 354 | |
| 355 | bool |
| 356 | GetUserName (uint32_t uid, std::string &name); |
| 357 | |
| 358 | bool |
| 359 | GetGroupName (uint32_t gid, std::string &name); |
| 360 | |
| 361 | bool |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 362 | HasFullVContSupport () |
| 363 | { |
| 364 | return GetVContSupported ('A'); |
| 365 | } |
| 366 | |
| 367 | bool |
| 368 | HasAnyVContSupport () |
| 369 | { |
| 370 | return GetVContSupported ('a'); |
| 371 | } |
| 372 | |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 373 | bool |
| 374 | GetStopReply (StringExtractorGDBRemote &response); |
| 375 | |
| 376 | bool |
Greg Clayton | f402f78 | 2012-10-13 02:11:55 +0000 | [diff] [blame] | 377 | GetThreadStopInfo (lldb::tid_t tid, |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 378 | StringExtractorGDBRemote &response); |
| 379 | |
| 380 | bool |
| 381 | SupportsGDBStoppointPacket (GDBStoppointType type) |
| 382 | { |
| 383 | switch (type) |
| 384 | { |
| 385 | case eBreakpointSoftware: return m_supports_z0; |
| 386 | case eBreakpointHardware: return m_supports_z1; |
| 387 | case eWatchpointWrite: return m_supports_z2; |
| 388 | case eWatchpointRead: return m_supports_z3; |
| 389 | case eWatchpointReadWrite: return m_supports_z4; |
Zachary Turner | 568b0de | 2015-02-18 18:44:03 +0000 | [diff] [blame] | 390 | default: return false; |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 391 | } |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 392 | } |
| 393 | uint8_t |
| 394 | SendGDBStoppointTypePacket (GDBStoppointType type, // Type of breakpoint or watchpoint |
| 395 | bool insert, // Insert or remove? |
| 396 | lldb::addr_t addr, // Address of breakpoint or watchpoint |
| 397 | uint32_t length); // Byte Size of breakpoint or watchpoint |
| 398 | |
Ewan Crawford | 78baa19 | 2015-05-13 09:18:18 +0000 | [diff] [blame] | 399 | bool |
| 400 | SetNonStopMode (const bool enable); |
| 401 | |
Greg Clayton | 9b1e1cd | 2011-04-04 18:18:57 +0000 | [diff] [blame] | 402 | void |
Greg Clayton | e034a04 | 2015-05-21 20:52:06 +0000 | [diff] [blame] | 403 | TestPacketSpeed (const uint32_t num_packets, uint32_t max_send, uint32_t max_recv, bool json, Stream &strm); |
Greg Clayton | 9b1e1cd | 2011-04-04 18:18:57 +0000 | [diff] [blame] | 404 | |
| 405 | // This packet is for testing the speed of the interface only. Both |
| 406 | // the client and server need to support it, but this allows us to |
| 407 | // measure the packet speed without any other work being done on the |
| 408 | // other end and avoids any of that work affecting the packet send |
| 409 | // and response times. |
| 410 | bool |
| 411 | SendSpeedTestPacket (uint32_t send_size, |
| 412 | uint32_t recv_size); |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 413 | |
| 414 | bool |
Jason Molenda | e9ca4af | 2013-02-23 02:04:45 +0000 | [diff] [blame] | 415 | SetCurrentThread (uint64_t tid); |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 416 | |
| 417 | bool |
Jason Molenda | e9ca4af | 2013-02-23 02:04:45 +0000 | [diff] [blame] | 418 | SetCurrentThreadForRun (uint64_t tid); |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 419 | |
Steve Pucci | 5ae54ae | 2014-01-25 05:46:51 +0000 | [diff] [blame] | 420 | bool |
Steve Pucci | 03904ac | 2014-03-04 23:18:46 +0000 | [diff] [blame] | 421 | GetQXferAuxvReadSupported (); |
| 422 | |
| 423 | bool |
Steve Pucci | 5ae54ae | 2014-01-25 05:46:51 +0000 | [diff] [blame] | 424 | GetQXferLibrariesReadSupported (); |
| 425 | |
| 426 | bool |
| 427 | GetQXferLibrariesSVR4ReadSupported (); |
| 428 | |
| 429 | uint64_t |
| 430 | GetRemoteMaxPacketSize(); |
| 431 | |
| 432 | bool |
Greg Clayton | b30c50c | 2015-05-29 00:01:55 +0000 | [diff] [blame] | 433 | GetEchoSupported (); |
| 434 | |
| 435 | bool |
Steve Pucci | 5ae54ae | 2014-01-25 05:46:51 +0000 | [diff] [blame] | 436 | GetAugmentedLibrariesSVR4ReadSupported (); |
| 437 | |
Colin Riley | c3c95b2 | 2015-04-16 15:51:33 +0000 | [diff] [blame] | 438 | bool |
| 439 | GetQXferFeaturesReadSupported (); |
| 440 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 441 | LazyBool |
Jim Ingham | 372787f | 2012-04-07 00:00:41 +0000 | [diff] [blame] | 442 | SupportsAllocDeallocMemory () // const |
Greg Clayton | 2a48f52 | 2011-05-14 01:50:35 +0000 | [diff] [blame] | 443 | { |
Jim Ingham | 372787f | 2012-04-07 00:00:41 +0000 | [diff] [blame] | 444 | // Uncomment this to have lldb pretend the debug server doesn't respond to alloc/dealloc memory packets. |
| 445 | // m_supports_alloc_dealloc_memory = lldb_private::eLazyBoolNo; |
Greg Clayton | 70b5765 | 2011-05-15 01:25:55 +0000 | [diff] [blame] | 446 | return m_supports_alloc_dealloc_memory; |
Greg Clayton | 2a48f52 | 2011-05-14 01:50:35 +0000 | [diff] [blame] | 447 | } |
| 448 | |
Greg Clayton | adc00cb | 2011-05-20 23:38:13 +0000 | [diff] [blame] | 449 | size_t |
| 450 | GetCurrentThreadIDs (std::vector<lldb::tid_t> &thread_ids, |
| 451 | bool &sequence_mutex_unavailable); |
| 452 | |
Greg Clayton | 2687cd1 | 2012-03-29 01:55:41 +0000 | [diff] [blame] | 453 | bool |
| 454 | GetInterruptWasSent () const |
| 455 | { |
| 456 | return m_interrupt_sent; |
| 457 | } |
Han Ming Ong | 4b6459f | 2013-01-18 23:11:53 +0000 | [diff] [blame] | 458 | |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 459 | lldb::user_id_t |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 460 | OpenFile (const FileSpec& file_spec, uint32_t flags, mode_t mode, Error &error); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 461 | |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 462 | bool |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 463 | CloseFile (lldb::user_id_t fd, Error &error); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 464 | |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 465 | lldb::user_id_t |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 466 | GetFileSize (const FileSpec& file_spec); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 467 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 468 | Error |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 469 | GetFilePermissions(const FileSpec &file_spec, uint32_t &file_permissions); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 470 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 471 | Error |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 472 | SetFilePermissions(const FileSpec &file_spec, uint32_t file_permissions); |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 473 | |
| 474 | uint64_t |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 475 | ReadFile (lldb::user_id_t fd, |
| 476 | uint64_t offset, |
| 477 | void *dst, |
| 478 | uint64_t dst_len, |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 479 | Error &error); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 480 | |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 481 | uint64_t |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 482 | WriteFile (lldb::user_id_t fd, |
| 483 | uint64_t offset, |
| 484 | const void* src, |
| 485 | uint64_t src_len, |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 486 | Error &error); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 487 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 488 | Error |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 489 | CreateSymlink(const FileSpec &src, |
| 490 | const FileSpec &dst); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 491 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 492 | Error |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 493 | Unlink(const FileSpec &file_spec); |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 494 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 495 | Error |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 496 | MakeDirectory(const FileSpec &file_spec, uint32_t mode); |
| 497 | |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 498 | bool |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 499 | GetFileExists (const FileSpec& file_spec); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 500 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 501 | Error |
Chaoren Lin | d3173f3 | 2015-05-29 19:52:29 +0000 | [diff] [blame] | 502 | RunShellCommand(const char *command, // Shouldn't be NULL |
| 503 | const FileSpec &working_dir, // Pass empty FileSpec to use the current working directory |
| 504 | int *status_ptr, // Pass NULL if you don't want the process exit status |
| 505 | int *signo_ptr, // Pass NULL if you don't want the signal that caused the process to exit |
| 506 | std::string *command_output, // Pass NULL if you don't want the command output |
| 507 | uint32_t timeout_sec); // Timeout in seconds to wait for shell program to finish |
| 508 | |
Greg Clayton | fbb7634 | 2013-11-20 21:07:01 +0000 | [diff] [blame] | 509 | bool |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 510 | CalculateMD5 (const FileSpec& file_spec, uint64_t &high, uint64_t &low); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 511 | |
Han Ming Ong | 4b6459f | 2013-01-18 23:11:53 +0000 | [diff] [blame] | 512 | std::string |
| 513 | HarmonizeThreadIdsForProfileData (ProcessGDBRemote *process, |
| 514 | StringExtractorGDBRemote &inputStringExtractor); |
Daniel Malea | e0f8f57 | 2013-08-26 23:57:52 +0000 | [diff] [blame] | 515 | |
Greg Clayton | f74cf86 | 2013-11-13 23:28:31 +0000 | [diff] [blame] | 516 | bool |
| 517 | ReadRegister(lldb::tid_t tid, |
| 518 | uint32_t reg_num, |
| 519 | StringExtractorGDBRemote &response); |
| 520 | |
| 521 | bool |
| 522 | ReadAllRegisters (lldb::tid_t tid, |
| 523 | StringExtractorGDBRemote &response); |
| 524 | |
| 525 | bool |
| 526 | SaveRegisterState (lldb::tid_t tid, uint32_t &save_id); |
| 527 | |
| 528 | bool |
| 529 | RestoreRegisterState (lldb::tid_t tid, uint32_t save_id); |
Jason Molenda | a332978 | 2014-03-29 18:54:20 +0000 | [diff] [blame] | 530 | |
| 531 | const char * |
| 532 | GetGDBServerProgramName(); |
Greg Clayton | f74cf86 | 2013-11-13 23:28:31 +0000 | [diff] [blame] | 533 | |
Jason Molenda | a332978 | 2014-03-29 18:54:20 +0000 | [diff] [blame] | 534 | uint32_t |
| 535 | GetGDBServerProgramVersion(); |
| 536 | |
| 537 | bool |
| 538 | AvoidGPackets(ProcessGDBRemote *process); |
| 539 | |
Jason Molenda | 705b180 | 2014-06-13 02:37:02 +0000 | [diff] [blame] | 540 | bool |
| 541 | GetThreadExtendedInfoSupported(); |
| 542 | |
Oleksiy Vyalov | 6801be3 | 2015-02-25 22:15:44 +0000 | [diff] [blame] | 543 | bool |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 544 | GetModuleInfo (const FileSpec& module_file_spec, |
| 545 | const ArchSpec& arch_spec, |
| 546 | ModuleSpec &module_spec); |
Oleksiy Vyalov | 6801be3 | 2015-02-25 22:15:44 +0000 | [diff] [blame] | 547 | |
Colin Riley | c3c95b2 | 2015-04-16 15:51:33 +0000 | [diff] [blame] | 548 | bool |
| 549 | ReadExtFeature (const lldb_private::ConstString object, |
| 550 | const lldb_private::ConstString annex, |
| 551 | std::string & out, |
| 552 | lldb_private::Error & err); |
| 553 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 554 | protected: |
| 555 | |
Greg Clayton | 3dedae1 | 2013-12-06 21:45:27 +0000 | [diff] [blame] | 556 | PacketResult |
| 557 | SendPacketAndWaitForResponseNoLock (const char *payload, |
| 558 | size_t payload_length, |
| 559 | StringExtractorGDBRemote &response); |
| 560 | |
Jason Molenda | f17b5ac | 2012-12-19 02:54:03 +0000 | [diff] [blame] | 561 | bool |
Oleksiy Vyalov | 1ef7b2c | 2015-02-04 23:19:15 +0000 | [diff] [blame] | 562 | GetCurrentProcessInfo (bool allow_lazy_pid = true); |
Jason Molenda | f17b5ac | 2012-12-19 02:54:03 +0000 | [diff] [blame] | 563 | |
Jason Molenda | a332978 | 2014-03-29 18:54:20 +0000 | [diff] [blame] | 564 | bool |
| 565 | GetGDBServerVersion(); |
| 566 | |
Jason Molenda | 91ffe0a | 2015-06-18 21:46:06 +0000 | [diff] [blame^] | 567 | // Given the list of compression types that the remote debug stub can support, |
| 568 | // possibly enable compression if we find an encoding we can handle. |
| 569 | void |
| 570 | MaybeEnableCompression (std::vector<std::string> supported_compressions); |
| 571 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 572 | //------------------------------------------------------------------ |
| 573 | // Classes that inherit from GDBRemoteCommunicationClient can see and modify these |
| 574 | //------------------------------------------------------------------ |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 575 | LazyBool m_supports_not_sending_acks; |
| 576 | LazyBool m_supports_thread_suffix; |
| 577 | LazyBool m_supports_threads_in_stop_reply; |
| 578 | LazyBool m_supports_vCont_all; |
| 579 | LazyBool m_supports_vCont_any; |
| 580 | LazyBool m_supports_vCont_c; |
| 581 | LazyBool m_supports_vCont_C; |
| 582 | LazyBool m_supports_vCont_s; |
| 583 | LazyBool m_supports_vCont_S; |
| 584 | LazyBool m_qHostInfo_is_valid; |
| 585 | LazyBool m_curr_pid_is_valid; |
| 586 | LazyBool m_qProcessInfo_is_valid; |
| 587 | LazyBool m_qGDBServerVersion_is_valid; |
| 588 | LazyBool m_supports_alloc_dealloc_memory; |
| 589 | LazyBool m_supports_memory_region_info; |
| 590 | LazyBool m_supports_watchpoint_support_info; |
| 591 | LazyBool m_supports_detach_stay_stopped; |
| 592 | LazyBool m_watchpoints_trigger_after_instruction; |
| 593 | LazyBool m_attach_or_wait_reply; |
| 594 | LazyBool m_prepare_for_reg_writing_reply; |
| 595 | LazyBool m_supports_p; |
| 596 | LazyBool m_supports_x; |
| 597 | LazyBool m_avoid_g_packets; |
| 598 | LazyBool m_supports_QSaveRegisterState; |
| 599 | LazyBool m_supports_qXfer_auxv_read; |
| 600 | LazyBool m_supports_qXfer_libraries_read; |
| 601 | LazyBool m_supports_qXfer_libraries_svr4_read; |
Colin Riley | c3c95b2 | 2015-04-16 15:51:33 +0000 | [diff] [blame] | 602 | LazyBool m_supports_qXfer_features_read; |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 603 | LazyBool m_supports_augmented_libraries_svr4_read; |
| 604 | LazyBool m_supports_jThreadExtendedInfo; |
Steve Pucci | 5ae54ae | 2014-01-25 05:46:51 +0000 | [diff] [blame] | 605 | |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 606 | bool |
| 607 | m_supports_qProcessInfoPID:1, |
| 608 | m_supports_qfProcessInfo:1, |
| 609 | m_supports_qUserName:1, |
| 610 | m_supports_qGroupName:1, |
| 611 | m_supports_qThreadStopInfo:1, |
| 612 | m_supports_z0:1, |
| 613 | m_supports_z1:1, |
| 614 | m_supports_z2:1, |
| 615 | m_supports_z3:1, |
Greg Clayton | 8960058 | 2013-10-10 17:53:50 +0000 | [diff] [blame] | 616 | m_supports_z4:1, |
| 617 | m_supports_QEnvironment:1, |
| 618 | m_supports_QEnvironmentHexEncoded:1; |
Greg Clayton | 2a48f52 | 2011-05-14 01:50:35 +0000 | [diff] [blame] | 619 | |
Todd Fiala | 9f72b3a | 2014-05-07 19:28:21 +0000 | [diff] [blame] | 620 | lldb::pid_t m_curr_pid; |
Greg Clayton | 8b82f08 | 2011-04-12 05:54:46 +0000 | [diff] [blame] | 621 | lldb::tid_t m_curr_tid; // Current gdb remote protocol thread index for all other operations |
| 622 | lldb::tid_t m_curr_tid_run; // Current gdb remote protocol thread index for continue, step, etc |
| 623 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 624 | |
Johnny Chen | 6463720 | 2012-05-23 21:09:52 +0000 | [diff] [blame] | 625 | uint32_t m_num_supported_hardware_watchpoints; |
| 626 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 627 | // If we need to send a packet while the target is running, the m_async_XXX |
| 628 | // member variables take care of making this happen. |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 629 | Mutex m_async_mutex; |
| 630 | Predicate<bool> m_async_packet_predicate; |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 631 | std::string m_async_packet; |
Jim Ingham | a6195b7 | 2013-12-18 01:24:33 +0000 | [diff] [blame] | 632 | PacketResult m_async_result; |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 633 | StringExtractorGDBRemote m_async_response; |
| 634 | int m_async_signal; // We were asked to deliver a signal to the inferior process. |
Greg Clayton | 2687cd1 | 2012-03-29 01:55:41 +0000 | [diff] [blame] | 635 | bool m_interrupt_sent; |
Han Ming Ong | 4b6459f | 2013-01-18 23:11:53 +0000 | [diff] [blame] | 636 | std::string m_partial_profile_data; |
| 637 | std::map<uint64_t, uint32_t> m_thread_id_to_used_usec_map; |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 638 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 639 | ArchSpec m_host_arch; |
| 640 | ArchSpec m_process_arch; |
Greg Clayton | 1cb6496 | 2011-03-24 04:28:38 +0000 | [diff] [blame] | 641 | uint32_t m_os_version_major; |
| 642 | uint32_t m_os_version_minor; |
| 643 | uint32_t m_os_version_update; |
| 644 | std::string m_os_build; |
| 645 | std::string m_os_kernel; |
| 646 | std::string m_hostname; |
Jason Molenda | a332978 | 2014-03-29 18:54:20 +0000 | [diff] [blame] | 647 | std::string m_gdb_server_name; // from reply to qGDBServerVersion, empty if qGDBServerVersion is not supported |
| 648 | uint32_t m_gdb_server_version; // from reply to qGDBServerVersion, zero if qGDBServerVersion is not supported |
Greg Clayton | 9ac6d2d | 2013-10-25 18:13:17 +0000 | [diff] [blame] | 649 | uint32_t m_default_packet_timeout; |
Steve Pucci | 5ae54ae | 2014-01-25 05:46:51 +0000 | [diff] [blame] | 650 | uint64_t m_max_packet_size; // as returned by qSupported |
Jason Molenda | 91ffe0a | 2015-06-18 21:46:06 +0000 | [diff] [blame^] | 651 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 652 | |
Greg Clayton | 32e0a75 | 2011-03-30 18:16:51 +0000 | [diff] [blame] | 653 | bool |
| 654 | DecodeProcessInfoResponse (StringExtractorGDBRemote &response, |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 655 | ProcessInstanceInfo &process_info); |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 656 | private: |
| 657 | //------------------------------------------------------------------ |
| 658 | // For GDBRemoteCommunicationClient only |
| 659 | //------------------------------------------------------------------ |
| 660 | DISALLOW_COPY_AND_ASSIGN (GDBRemoteCommunicationClient); |
| 661 | }; |
| 662 | |
Tamas Berghammer | db264a6 | 2015-03-31 09:52:22 +0000 | [diff] [blame] | 663 | } // namespace process_gdb_remote |
| 664 | } // namespace lldb_private |
| 665 | |
Greg Clayton | 576d883 | 2011-03-22 04:00:09 +0000 | [diff] [blame] | 666 | #endif // liblldb_GDBRemoteCommunicationClient_h_ |