1 //===-- GDBRemoteCommunicationServer.cpp ------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 #include "GDBRemoteCommunicationServer.h"
15 // Other libraries and framework includes
16 #include "llvm/ADT/Triple.h"
17 #include "lldb/Interpreter/Args.h"
18 #include "lldb/Core/ConnectionFileDescriptor.h"
19 #include "lldb/Core/Log.h"
20 #include "lldb/Core/State.h"
21 #include "lldb/Core/StreamString.h"
22 #include "lldb/Host/Endian.h"
23 #include "lldb/Host/Host.h"
24 #include "lldb/Host/TimeValue.h"
25 #include "lldb/Target/Process.h"
28 #include "Utility/StringExtractorGDBRemote.h"
29 #include "ProcessGDBRemote.h"
30 #include "ProcessGDBRemoteLog.h"
33 using namespace lldb_private;
35 //----------------------------------------------------------------------
36 // GDBRemoteCommunicationServer constructor
37 //----------------------------------------------------------------------
38 GDBRemoteCommunicationServer::GDBRemoteCommunicationServer(bool is_platform) :
39 GDBRemoteCommunication ("gdb-remote.server", "gdb-remote.server.rx_packet", is_platform),
40 m_async_thread (LLDB_INVALID_HOST_THREAD),
41 m_process_launch_info (),
42 m_process_launch_error (),
44 m_proc_infos_index (0),
50 //----------------------------------------------------------------------
52 //----------------------------------------------------------------------
53 GDBRemoteCommunicationServer::~GDBRemoteCommunicationServer()
59 //GDBRemoteCommunicationServer::AsyncThread (void *arg)
61 // GDBRemoteCommunicationServer *server = (GDBRemoteCommunicationServer*) arg;
63 // Log *log;// (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
65 // log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) thread starting...", __FUNCTION__, arg, process->GetID());
67 // StringExtractorGDBRemote packet;
75 // log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) thread exiting...", __FUNCTION__, arg, process->GetID());
77 // process->m_async_thread = LLDB_INVALID_HOST_THREAD;
82 GDBRemoteCommunicationServer::GetPacketAndSendResponse (uint32_t timeout_usec,
87 StringExtractorGDBRemote packet;
88 if (WaitForPacketWithTimeoutMicroSecondsNoLock (packet, timeout_usec))
90 const StringExtractorGDBRemote::ServerPacketType packet_type = packet.GetServerPacketType ();
93 case StringExtractorGDBRemote::eServerPacketType_nack:
94 case StringExtractorGDBRemote::eServerPacketType_ack:
97 case StringExtractorGDBRemote::eServerPacketType_invalid:
98 error.SetErrorString("invalid packet");
102 case StringExtractorGDBRemote::eServerPacketType_interrupt:
103 error.SetErrorString("interrupt received");
107 case StringExtractorGDBRemote::eServerPacketType_unimplemented:
108 return SendUnimplementedResponse (packet.GetStringRef().c_str()) > 0;
110 case StringExtractorGDBRemote::eServerPacketType_A:
111 return Handle_A (packet);
113 case StringExtractorGDBRemote::eServerPacketType_qfProcessInfo:
114 return Handle_qfProcessInfo (packet);
116 case StringExtractorGDBRemote::eServerPacketType_qsProcessInfo:
117 return Handle_qsProcessInfo (packet);
119 case StringExtractorGDBRemote::eServerPacketType_qC:
120 return Handle_qC (packet);
122 case StringExtractorGDBRemote::eServerPacketType_qHostInfo:
123 return Handle_qHostInfo (packet);
125 case StringExtractorGDBRemote::eServerPacketType_qLaunchGDBServer:
126 return Handle_qLaunchGDBServer (packet);
128 case StringExtractorGDBRemote::eServerPacketType_qLaunchSuccess:
129 return Handle_qLaunchSuccess (packet);
131 case StringExtractorGDBRemote::eServerPacketType_qGroupName:
132 return Handle_qGroupName (packet);
134 case StringExtractorGDBRemote::eServerPacketType_qProcessInfoPID:
135 return Handle_qProcessInfoPID (packet);
137 case StringExtractorGDBRemote::eServerPacketType_qSpeedTest:
138 return Handle_qSpeedTest (packet);
140 case StringExtractorGDBRemote::eServerPacketType_qUserName:
141 return Handle_qUserName (packet);
143 case StringExtractorGDBRemote::eServerPacketType_QEnvironment:
144 return Handle_QEnvironment (packet);
146 case StringExtractorGDBRemote::eServerPacketType_QSetDisableASLR:
147 return Handle_QSetDisableASLR (packet);
149 case StringExtractorGDBRemote::eServerPacketType_QSetSTDIN:
150 return Handle_QSetSTDIN (packet);
152 case StringExtractorGDBRemote::eServerPacketType_QSetSTDOUT:
153 return Handle_QSetSTDOUT (packet);
155 case StringExtractorGDBRemote::eServerPacketType_QSetSTDERR:
156 return Handle_QSetSTDERR (packet);
158 case StringExtractorGDBRemote::eServerPacketType_QSetWorkingDir:
159 return Handle_QSetWorkingDir (packet);
161 case StringExtractorGDBRemote::eServerPacketType_QStartNoAckMode:
162 return Handle_QStartNoAckMode (packet);
169 error.SetErrorString("lost connection");
171 error.SetErrorString("timeout");
178 GDBRemoteCommunicationServer::SendUnimplementedResponse (const char *)
180 // TODO: Log the packet we aren't handling...
181 return SendPacketNoLock ("", 0);
185 GDBRemoteCommunicationServer::SendErrorResponse (uint8_t err)
188 int packet_len = ::snprintf (packet, sizeof(packet), "E%2.2x", err);
189 assert (packet_len < (int)sizeof(packet));
190 return SendPacketNoLock (packet, packet_len);
195 GDBRemoteCommunicationServer::SendOKResponse ()
197 return SendPacketNoLock ("OK", 2);
201 GDBRemoteCommunicationServer::HandshakeWithClient(Error *error_ptr)
207 GDBRemoteCommunicationServer::Handle_qHostInfo (StringExtractorGDBRemote &packet)
209 StreamString response;
211 // $cputype:16777223;cpusubtype:3;ostype:Darwin;vendor:apple;endian:little;ptrsize:8;#00
213 ArchSpec host_arch (Host::GetArchitecture ());
214 const llvm::Triple &host_triple = host_arch.GetTriple();
215 response.PutCString("triple:");
216 response.PutCStringAsRawHex8(host_triple.getTriple().c_str());
217 response.Printf (";ptrsize:%u;",host_arch.GetAddressByteSize());
219 uint32_t cpu = host_arch.GetMachOCPUType();
220 uint32_t sub = host_arch.GetMachOCPUSubType();
221 if (cpu != LLDB_INVALID_CPUTYPE)
222 response.Printf ("cputype:%u;", cpu);
223 if (sub != LLDB_INVALID_CPUTYPE)
224 response.Printf ("cpusubtype:%u;", sub);
226 if (cpu == ArchSpec::kCore_arm_any)
227 response.Printf("watchpoint_exceptions_received:before;"); // On armv7 we use "synchronous" watchpoints which means the exception is delivered before the instruction executes.
229 response.Printf("watchpoint_exceptions_received:after;");
231 switch (lldb::endian::InlHostByteOrder())
233 case eByteOrderBig: response.PutCString ("endian:big;"); break;
234 case eByteOrderLittle: response.PutCString ("endian:little;"); break;
235 case eByteOrderPDP: response.PutCString ("endian:pdp;"); break;
236 default: response.PutCString ("endian:unknown;"); break;
239 uint32_t major = UINT32_MAX;
240 uint32_t minor = UINT32_MAX;
241 uint32_t update = UINT32_MAX;
242 if (Host::GetOSVersion (major, minor, update))
244 if (major != UINT32_MAX)
246 response.Printf("os_version:%u", major);
247 if (minor != UINT32_MAX)
249 response.Printf(".%u", minor);
250 if (update != UINT32_MAX)
251 response.Printf(".%u", update);
253 response.PutChar(';');
258 if (Host::GetOSBuildString (s))
260 response.PutCString ("os_build:");
261 response.PutCStringAsRawHex8(s.c_str());
262 response.PutChar(';');
264 if (Host::GetOSKernelDescription (s))
266 response.PutCString ("os_kernel:");
267 response.PutCStringAsRawHex8(s.c_str());
268 response.PutChar(';');
270 if (Host::GetHostname (s))
272 response.PutCString ("hostname:");
273 response.PutCStringAsRawHex8(s.c_str());
274 response.PutChar(';');
277 return SendPacketNoLock (response.GetData(), response.GetSize()) > 0;
281 CreateProcessInfoResponse (const ProcessInstanceInfo &proc_info, StreamString &response)
283 response.Printf ("pid:%" PRIu64 ";ppid:%" PRIu64 ";uid:%i;gid:%i;euid:%i;egid:%i;",
284 proc_info.GetProcessID(),
285 proc_info.GetParentProcessID(),
286 proc_info.GetUserID(),
287 proc_info.GetGroupID(),
288 proc_info.GetEffectiveUserID(),
289 proc_info.GetEffectiveGroupID());
290 response.PutCString ("name:");
291 response.PutCStringAsRawHex8(proc_info.GetName());
292 response.PutChar(';');
293 const ArchSpec &proc_arch = proc_info.GetArchitecture();
294 if (proc_arch.IsValid())
296 const llvm::Triple &proc_triple = proc_arch.GetTriple();
297 response.PutCString("triple:");
298 response.PutCStringAsRawHex8(proc_triple.getTriple().c_str());
299 response.PutChar(';');
304 GDBRemoteCommunicationServer::Handle_qProcessInfoPID (StringExtractorGDBRemote &packet)
306 // Packet format: "qProcessInfoPID:%i" where %i is the pid
307 packet.SetFilePos(::strlen ("qProcessInfoPID:"));
308 lldb::pid_t pid = packet.GetU32 (LLDB_INVALID_PROCESS_ID);
309 if (pid != LLDB_INVALID_PROCESS_ID)
311 ProcessInstanceInfo proc_info;
312 if (Host::GetProcessInfo(pid, proc_info))
314 StreamString response;
315 CreateProcessInfoResponse (proc_info, response);
316 return SendPacketNoLock (response.GetData(), response.GetSize());
319 return SendErrorResponse (1);
323 GDBRemoteCommunicationServer::Handle_qfProcessInfo (StringExtractorGDBRemote &packet)
325 m_proc_infos_index = 0;
326 m_proc_infos.Clear();
328 ProcessInstanceInfoMatch match_info;
329 packet.SetFilePos(::strlen ("qfProcessInfo"));
330 if (packet.GetChar() == ':')
335 while (packet.GetNameColonValue(key, value))
338 if (key.compare("name") == 0)
340 StringExtractor extractor;
341 extractor.GetStringRef().swap(value);
342 extractor.GetHexByteString (value);
343 match_info.GetProcessInfo().GetExecutableFile().SetFile(value.c_str(), false);
345 else if (key.compare("name_match") == 0)
347 if (value.compare("equals") == 0)
349 match_info.SetNameMatchType (eNameMatchEquals);
351 else if (value.compare("starts_with") == 0)
353 match_info.SetNameMatchType (eNameMatchStartsWith);
355 else if (value.compare("ends_with") == 0)
357 match_info.SetNameMatchType (eNameMatchEndsWith);
359 else if (value.compare("contains") == 0)
361 match_info.SetNameMatchType (eNameMatchContains);
363 else if (value.compare("regex") == 0)
365 match_info.SetNameMatchType (eNameMatchRegularExpression);
372 else if (key.compare("pid") == 0)
374 match_info.GetProcessInfo().SetProcessID (Args::StringToUInt32(value.c_str(), LLDB_INVALID_PROCESS_ID, 0, &success));
376 else if (key.compare("parent_pid") == 0)
378 match_info.GetProcessInfo().SetParentProcessID (Args::StringToUInt32(value.c_str(), LLDB_INVALID_PROCESS_ID, 0, &success));
380 else if (key.compare("uid") == 0)
382 match_info.GetProcessInfo().SetUserID (Args::StringToUInt32(value.c_str(), UINT32_MAX, 0, &success));
384 else if (key.compare("gid") == 0)
386 match_info.GetProcessInfo().SetGroupID (Args::StringToUInt32(value.c_str(), UINT32_MAX, 0, &success));
388 else if (key.compare("euid") == 0)
390 match_info.GetProcessInfo().SetEffectiveUserID (Args::StringToUInt32(value.c_str(), UINT32_MAX, 0, &success));
392 else if (key.compare("egid") == 0)
394 match_info.GetProcessInfo().SetEffectiveGroupID (Args::StringToUInt32(value.c_str(), UINT32_MAX, 0, &success));
396 else if (key.compare("all_users") == 0)
398 match_info.SetMatchAllUsers(Args::StringToBoolean(value.c_str(), false, &success));
400 else if (key.compare("triple") == 0)
402 match_info.GetProcessInfo().GetArchitecture().SetTriple (value.c_str(), NULL);
410 return SendErrorResponse (2);
414 if (Host::FindProcesses (match_info, m_proc_infos))
416 // We found something, return the first item by calling the get
417 // subsequent process info packet handler...
418 return Handle_qsProcessInfo (packet);
420 return SendErrorResponse (3);
424 GDBRemoteCommunicationServer::Handle_qsProcessInfo (StringExtractorGDBRemote &packet)
426 if (m_proc_infos_index < m_proc_infos.GetSize())
428 StreamString response;
429 CreateProcessInfoResponse (m_proc_infos.GetProcessInfoAtIndex(m_proc_infos_index), response);
430 ++m_proc_infos_index;
431 return SendPacketNoLock (response.GetData(), response.GetSize());
433 return SendErrorResponse (4);
437 GDBRemoteCommunicationServer::Handle_qUserName (StringExtractorGDBRemote &packet)
439 // Packet format: "qUserName:%i" where %i is the uid
440 packet.SetFilePos(::strlen ("qUserName:"));
441 uint32_t uid = packet.GetU32 (UINT32_MAX);
442 if (uid != UINT32_MAX)
445 if (Host::GetUserName (uid, name))
447 StreamString response;
448 response.PutCStringAsRawHex8 (name.c_str());
449 return SendPacketNoLock (response.GetData(), response.GetSize());
452 return SendErrorResponse (5);
457 GDBRemoteCommunicationServer::Handle_qGroupName (StringExtractorGDBRemote &packet)
459 // Packet format: "qGroupName:%i" where %i is the gid
460 packet.SetFilePos(::strlen ("qGroupName:"));
461 uint32_t gid = packet.GetU32 (UINT32_MAX);
462 if (gid != UINT32_MAX)
465 if (Host::GetGroupName (gid, name))
467 StreamString response;
468 response.PutCStringAsRawHex8 (name.c_str());
469 return SendPacketNoLock (response.GetData(), response.GetSize());
472 return SendErrorResponse (6);
476 GDBRemoteCommunicationServer::Handle_qSpeedTest (StringExtractorGDBRemote &packet)
478 packet.SetFilePos(::strlen ("qSpeedTest:"));
482 bool success = packet.GetNameColonValue(key, value);
483 if (success && key.compare("response_size") == 0)
485 uint32_t response_size = Args::StringToUInt32(value.c_str(), 0, 0, &success);
488 if (response_size == 0)
489 return SendOKResponse();
490 StreamString response;
491 uint32_t bytes_left = response_size;
492 response.PutCString("data:");
493 while (bytes_left > 0)
495 if (bytes_left >= 26)
497 response.PutCString("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
502 response.Printf ("%*.*s;", bytes_left, bytes_left, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
506 return SendPacketNoLock (response.GetData(), response.GetSize());
509 return SendErrorResponse (7);
514 AcceptPortFromInferior (void *arg)
516 const char *connect_url = (const char *)arg;
517 ConnectionFileDescriptor file_conn;
519 if (file_conn.Connect (connect_url, &error) == eConnectionStatusSuccess)
522 ::memset (pid_str, 0, sizeof(pid_str));
523 ConnectionStatus status;
524 const size_t pid_str_len = file_conn.Read (pid_str, sizeof(pid_str), 0, status, NULL);
527 int pid = atoi (pid_str);
528 return (void *)(intptr_t)pid;
535 //WaitForProcessToSIGSTOP (const lldb::pid_t pid, const int timeout_in_seconds)
537 // const int time_delta_usecs = 100000;
538 // const int num_retries = timeout_in_seconds/time_delta_usecs;
539 // for (int i=0; i<num_retries; i++)
541 // struct proc_bsdinfo bsd_info;
542 // int error = ::proc_pidinfo (pid, PROC_PIDTBSDINFO,
545 // PROC_PIDTBSDINFO_SIZE);
559 // if (bsd_info.pbi_status == SSTOP)
562 // ::usleep (time_delta_usecs);
568 GDBRemoteCommunicationServer::Handle_A (StringExtractorGDBRemote &packet)
570 // The 'A' packet is the most over designed packet ever here with
571 // redundant argument indexes, redundant argument lengths and needed hex
572 // encoded argument string values. Really all that is needed is a comma
573 // separated hex encoded argument value list, but we will stay true to the
574 // documented version of the 'A' packet here...
576 packet.SetFilePos(1); // Skip the 'A'
578 while (success && packet.GetBytesLeft() > 0)
580 // Decode the decimal argument string length. This length is the
581 // number of hex nibbles in the argument string value.
582 const uint32_t arg_len = packet.GetU32(UINT32_MAX);
583 if (arg_len == UINT32_MAX)
587 // Make sure the argument hex string length is followed by a comma
588 if (packet.GetChar() != ',')
592 // Decode the argument index. We ignore this really becuase
593 // who would really send down the arguments in a random order???
594 const uint32_t arg_idx = packet.GetU32(UINT32_MAX);
595 if (arg_idx == UINT32_MAX)
599 // Make sure the argument index is followed by a comma
600 if (packet.GetChar() != ',')
604 // Decode the argument string value from hex bytes
605 // back into a UTF8 string and make sure the length
606 // matches the one supplied in the packet
608 if (packet.GetHexByteString(arg) != (arg_len / 2))
612 // If there are any bytes lft
613 if (packet.GetBytesLeft())
615 if (packet.GetChar() != ',')
622 m_process_launch_info.GetExecutableFile().SetFile(arg.c_str(), false);
623 m_process_launch_info.GetArguments().AppendArgument(arg.c_str());
634 m_process_launch_info.GetFlags().Set (eLaunchFlagDebug);
635 m_process_launch_error = Host::LaunchProcess (m_process_launch_info);
636 if (m_process_launch_info.GetProcessID() != LLDB_INVALID_PROCESS_ID)
638 return SendOKResponse ();
641 return SendErrorResponse (8);
645 GDBRemoteCommunicationServer::Handle_qC (StringExtractorGDBRemote &packet)
647 lldb::pid_t pid = m_process_launch_info.GetProcessID();
648 StreamString response;
649 response.Printf("QC%" PRIx64, pid);
652 // If we launch a process and this GDB server is acting as a platform,
653 // then we need to clear the process launch state so we can start
654 // launching another process. In order to launch a process a bunch or
655 // packets need to be sent: environment packets, working directory,
656 // disable ASLR, and many more settings. When we launch a process we
657 // then need to know when to clear this information. Currently we are
658 // selecting the 'qC' packet as that packet which seems to make the most
660 if (pid != LLDB_INVALID_PROCESS_ID)
662 m_process_launch_info.Clear();
665 return SendPacketNoLock (response.GetData(), response.GetSize());
669 GDBRemoteCommunicationServer::Handle_qLaunchGDBServer (StringExtractorGDBRemote &packet)
671 // Spawn a local debugserver as a platform so we can then attach or launch
676 // Sleep and wait a bit for debugserver to start to listen...
677 ConnectionFileDescriptor file_conn;
678 char connect_url[PATH_MAX];
680 char unix_socket_name[PATH_MAX] = "/tmp/XXXXXX";
681 if (::mktemp (unix_socket_name) == NULL)
683 error.SetErrorString ("failed to make temporary path for a unix socket");
687 ::snprintf (connect_url, sizeof(connect_url), "unix-accept://%s", unix_socket_name);
688 // Spawn a new thread to accept the port that gets bound after
689 // binding to port 0 (zero).
690 lldb::thread_t accept_thread = Host::ThreadCreate (unix_socket_name,
691 AcceptPortFromInferior,
695 if (IS_VALID_LLDB_HOST_THREAD(accept_thread))
697 // Spawn a debugserver and try to get
698 ProcessLaunchInfo debugserver_launch_info;
699 error = StartDebugserverProcess ("localhost:0",
701 debugserver_launch_info);
703 lldb::pid_t debugserver_pid = debugserver_launch_info.GetProcessID();
706 bool success = false;
708 thread_result_t accept_thread_result = NULL;
709 if (Host::ThreadJoin (accept_thread, &accept_thread_result, &error))
711 if (accept_thread_result)
713 uint16_t port = (intptr_t)accept_thread_result;
715 const int response_len = ::snprintf (response, sizeof(response), "pid:%" PRIu64 ";port:%u;", debugserver_pid, port);
716 assert (response_len < (int)sizeof(response));
717 //m_port_to_pid_map[port] = debugserver_launch_info.GetProcessID();
718 success = SendPacketNoLock (response, response_len) > 0;
721 ::unlink (unix_socket_name);
725 if (debugserver_pid != LLDB_INVALID_PROCESS_ID)
726 ::kill (debugserver_pid, SIGINT);
733 return SendErrorResponse (13);
737 GDBRemoteCommunicationServer::Handle_qLaunchSuccess (StringExtractorGDBRemote &packet)
739 if (m_process_launch_error.Success())
740 return SendOKResponse();
741 StreamString response;
742 response.PutChar('E');
743 response.PutCString(m_process_launch_error.AsCString("<unknown error>"));
744 return SendPacketNoLock (response.GetData(), response.GetSize());
748 GDBRemoteCommunicationServer::Handle_QEnvironment (StringExtractorGDBRemote &packet)
750 packet.SetFilePos(::strlen ("QEnvironment:"));
751 const uint32_t bytes_left = packet.GetBytesLeft();
754 m_process_launch_info.GetEnvironmentEntries ().AppendArgument (packet.Peek());
755 return SendOKResponse ();
757 return SendErrorResponse (9);
761 GDBRemoteCommunicationServer::Handle_QSetDisableASLR (StringExtractorGDBRemote &packet)
763 packet.SetFilePos(::strlen ("QSetDisableASLR:"));
764 if (packet.GetU32(0))
765 m_process_launch_info.GetFlags().Set (eLaunchFlagDisableASLR);
767 m_process_launch_info.GetFlags().Clear (eLaunchFlagDisableASLR);
768 return SendOKResponse ();
772 GDBRemoteCommunicationServer::Handle_QSetWorkingDir (StringExtractorGDBRemote &packet)
774 packet.SetFilePos(::strlen ("QSetWorkingDir:"));
776 packet.GetHexByteString(path);
777 m_process_launch_info.SwapWorkingDirectory (path);
778 return SendOKResponse ();
782 GDBRemoteCommunicationServer::Handle_QSetSTDIN (StringExtractorGDBRemote &packet)
784 packet.SetFilePos(::strlen ("QSetSTDIN:"));
785 ProcessLaunchInfo::FileAction file_action;
787 packet.GetHexByteString(path);
788 const bool read = false;
789 const bool write = true;
790 if (file_action.Open(STDIN_FILENO, path.c_str(), read, write))
792 m_process_launch_info.AppendFileAction(file_action);
793 return SendOKResponse ();
795 return SendErrorResponse (10);
799 GDBRemoteCommunicationServer::Handle_QSetSTDOUT (StringExtractorGDBRemote &packet)
801 packet.SetFilePos(::strlen ("QSetSTDOUT:"));
802 ProcessLaunchInfo::FileAction file_action;
804 packet.GetHexByteString(path);
805 const bool read = true;
806 const bool write = false;
807 if (file_action.Open(STDOUT_FILENO, path.c_str(), read, write))
809 m_process_launch_info.AppendFileAction(file_action);
810 return SendOKResponse ();
812 return SendErrorResponse (11);
816 GDBRemoteCommunicationServer::Handle_QSetSTDERR (StringExtractorGDBRemote &packet)
818 packet.SetFilePos(::strlen ("QSetSTDERR:"));
819 ProcessLaunchInfo::FileAction file_action;
821 packet.GetHexByteString(path);
822 const bool read = true;
823 const bool write = false;
824 if (file_action.Open(STDERR_FILENO, path.c_str(), read, write))
826 m_process_launch_info.AppendFileAction(file_action);
827 return SendOKResponse ();
829 return SendErrorResponse (12);
833 GDBRemoteCommunicationServer::Handle_QStartNoAckMode (StringExtractorGDBRemote &packet)
835 // Send response first before changing m_send_acks to we ack this packet