Lines Matching defs:packet

94     // The return value from QueryNoAckModeSupported() is true if the packet
111 "handshake packet");
114 "failed to get reply to handshake packet within timeout of "
207 // This is the first real packet that we'll send in a debug session and it
209 // 6 seconds for a reply to this packet.
355 // build the qSupported packet
362 StreamString packet;
363 packet.PutCString("qSupported");
365 packet.PutCString(i == 0 ? ":" : ";");
366 packet.PutCString(features[i]);
370 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
372 // Hang on to the qSupported packet, so that platforms can do custom
518 "for %s packet.",
533 // Check if the target supports 'p' packet. It sends out a 'p' packet and
534 // checks the response. A normal packet will tell us that support is available.
561 // Get information on all threads at one using the "jThreadsInfo" packet
659 StreamString packet;
660 packet.Printf("qMemTags:%" PRIx64 ",%zx:%" PRIx32, addr, len, type);
665 if (SendPacketAndWaitForResponse(packet.GetString(), response) !=
668 LLDB_LOGF(log, "GDBRemoteCommunicationClient::%s: qMemTags packet failed",
704 StreamString packet;
705 packet.Printf("QMemTags:%" PRIx64 ",%zx:%" PRIx32 ":", addr, len, type);
706 packet.PutBytesAsRawHex8(tags.data(), tags.size());
710 if (SendPacketAndWaitForResponse(packet.GetString(), response) !=
713 status = Status::FromErrorString("QMemTags packet failed");
722 char packet[256];
723 snprintf(packet, sizeof(packet), "x0,0");
724 if (SendPacketAndWaitForResponse(packet, response) ==
788 StreamString packet;
789 packet.PutCString("vRun");
791 packet.PutChar(';');
792 packet.PutStringAsRawHex8(arg.ref());
796 if (SendPacketAndWaitForResponse(packet.GetString(), response) !=
799 "Sending vRun packet failed");
804 // vRun replies with a stop reason packet
805 // FIXME: right now we just discard the packet and LLDB queries
814 StreamString packet;
815 packet.PutChar('A');
818 packet << LS;
819 packet.Format("{0},{1},", arg.value().ref().size() * 2, arg.index());
820 packet.PutStringAsRawHex8(arg.value().ref());
824 if (SendPacketAndWaitForResponse(packet.GetString(), response) !=
827 "Sending A packet failed");
835 "Sending qLaunchSuccess packet failed");
886 StreamString packet;
887 packet.Printf("QEnvironment:%s", name_equal_value);
888 if (SendPacketAndWaitForResponse(packet.GetString(), response) !=
905 StreamString packet;
906 packet.PutCString("QEnvironmentHexEncoded:");
907 packet.PutBytesAsRawHex8(name_equal_value, strlen(name_equal_value));
908 if (SendPacketAndWaitForResponse(packet.GetString(), response) !=
929 StreamString packet;
930 packet.Printf("QLaunchArch:%s", arch);
932 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
947 StreamString packet;
948 packet.Printf("QSetProcessEvent:%s", data);
950 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
1145 std::string packet = "QEnableCompression:type:" + avail_name.str() + ";";
1146 if (SendPacketAndWaitForResponse(packet, response) != PacketResult::Success)
1418 StreamString packet;
1419 packet.PutCString("I");
1420 packet.PutBytesAsRawHex8(data, data_len);
1422 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
1459 char packet[64];
1461 packet, sizeof(packet), "_M%" PRIx64 ",%s%s%s", (uint64_t)size,
1465 assert(packet_len < (int)sizeof(packet));
1468 if (SendPacketAndWaitForResponse(packet, response) ==
1484 char packet[64];
1486 ::snprintf(packet, sizeof(packet), "_m%" PRIx64, (uint64_t)addr);
1487 assert(packet_len < (int)sizeof(packet));
1490 if (SendPacketAndWaitForResponse(packet, response) ==
1506 lldb_private::StreamString packet;
1508 packet.PutChar('D');
1511 char packet[64];
1513 ::snprintf(packet, sizeof(packet), "qSupportsDetachAndStayStopped:");
1514 assert(packet_len < (int)sizeof(packet));
1517 if (SendPacketAndWaitForResponse(packet, response) ==
1531 packet.PutChar('1');
1540 packet.PutChar(';');
1541 packet.PutHex64(pid);
1550 SendPacketAndWaitForResponse(packet.GetString(), response);
1552 error = Status::FromErrorString("Sending isconnect packet failed.");
1563 char packet[64];
1565 packet, sizeof(packet), "qMemoryRegionInfo:%" PRIx64, (uint64_t)addr);
1566 assert(packet_len < (int)sizeof(packet));
1569 if (SendPacketAndWaitForResponse(packet, response) ==
1870 StreamString packet;
1871 packet.PutCString("QSetSTDIN:");
1872 packet.PutStringAsRawHex8(path);
1875 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
1890 StreamString packet;
1891 packet.PutCString("QSetSTDOUT:");
1892 packet.PutStringAsRawHex8(path);
1895 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
1910 StreamString packet;
1911 packet.PutCString("QSetSTDERR:");
1912 packet.PutStringAsRawHex8(path);
1915 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
1946 StreamString packet;
1947 packet.PutCString("QSetWorkingDir:");
1948 packet.PutStringAsRawHex8(path);
1951 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
1964 char packet[32];
1966 ::snprintf(packet, sizeof(packet), "QSetDisableASLR:%i", enable ? 1 : 0);
1967 assert(packet_len < (int)sizeof(packet));
1970 if (SendPacketAndWaitForResponse(packet, response) == PacketResult::Success) {
1981 char packet[32];
1982 const int packet_len = ::snprintf(packet, sizeof(packet),
1984 assert(packet_len < (int)sizeof(packet));
1987 if (SendPacketAndWaitForResponse(packet, response) == PacketResult::Success) {
2099 char packet[32];
2101 ::snprintf(packet, sizeof(packet), "qProcessInfoPID:%" PRIu64, pid);
2102 assert(packet_len < (int)sizeof(packet));
2105 if (SendPacketAndWaitForResponse(packet, response) ==
2293 StreamString packet;
2294 packet.PutCString("qfProcessInfo");
2296 packet.PutChar(':');
2308 packet.PutCString("name_match:equals;");
2312 packet.PutCString("name_match:contains;");
2316 packet.PutCString("name_match:starts_with;");
2320 packet.PutCString("name_match:ends_with;");
2324 packet.PutCString("name_match:regex;");
2328 packet.PutCString("name:");
2329 packet.PutBytesAsRawHex8(name, ::strlen(name));
2330 packet.PutChar(';');
2335 packet.Printf("pid:%" PRIu64 ";",
2338 packet.Printf("parent_pid:%" PRIu64 ";",
2341 packet.Printf("uid:%u;", match_info.GetProcessInfo().GetUserID());
2343 packet.Printf("gid:%u;", match_info.GetProcessInfo().GetGroupID());
2345 packet.Printf("euid:%u;",
2348 packet.Printf("egid:%u;",
2350 packet.Printf("all_users:%u;", match_info.GetMatchAllUsers() ? 1 : 0);
2355 packet.PutCString("triple:");
2356 packet.PutCString(triple.getTriple());
2357 packet.PutChar(';');
2361 // Increase timeout as the first qfProcessInfo packet takes a long time on
2364 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
2385 char packet[32];
2387 ::snprintf(packet, sizeof(packet), "qUserName:%i", uid);
2388 assert(packet_len < (int)sizeof(packet));
2391 if (SendPacketAndWaitForResponse(packet, response) ==
2395 // the hex encoded user name and should make up the entire packet. If
2412 char packet[32];
2414 ::snprintf(packet, sizeof(packet), "qGroupName:%i", gid);
2415 assert(packet_len < (int)sizeof(packet));
2418 if (SendPacketAndWaitForResponse(packet, response) ==
2422 // the hex encoded group name and should make up the entire packet. If
2436 static void MakeSpeedTestPacket(StreamString &packet, uint32_t send_size,
2438 packet.Clear();
2439 packet.Printf("qSpeedTest:response_size:%i;data:", recv_size);
2443 packet.PutCString("abcdefghijklmnopqrstuvwxyz");
2446 packet.Printf("%*.*s;", bytes_left, bytes_left,
2476 StreamString packet;
2494 MakeSpeedTestPacket(packet, send_size, recv_size);
2502 SendPacketAndWaitForResponse(packet.GetString(), response);
2524 "{3,9:f2} packets/s ({4,10:ms+f6} per packet) with "
2541 "packet sizes:\n",
2547 MakeSpeedTestPacket(packet, send_size, recv_size);
2557 SendPacketAndWaitForResponse(packet.GetString(), response);
2581 "{6,9:f2} packets/sec ({7,10:ms+f6} per packet)\n",
2598 StreamString packet;
2599 packet.Printf("qSpeedTest:response_size:%i;data:", recv_size);
2603 packet.PutCString("abcdefghijklmnopqrstuvwxyz");
2606 packet.Printf("%*.*s;", bytes_left, bytes_left,
2613 return SendPacketAndWaitForResponse(packet.GetString(), response) ==
2721 lldb_private::StreamString packet;
2722 packet.PutChar('H');
2723 packet.PutChar(op);
2726 packet.Printf("p%" PRIx64 ".", pid);
2729 packet.PutCString("-1");
2731 packet.Printf("%" PRIx64, tid);
2734 if (SendPacketAndWaitForResponse(packet.GetString(), response) ==
2741 * Hg packet.
2742 * The reply from '?' packet could be as simple as 'S05'. There is no packet
2792 char packet[256];
2794 ::snprintf(packet, sizeof(packet), "qThreadStopInfo%" PRIx64, tid);
2795 assert(packet_len < (int)sizeof(packet));
2797 if (SendPacketAndWaitForResponse(packet, response) ==
2822 // Construct the breakpoint packet
2823 char packet[64];
2825 ::snprintf(packet, sizeof(packet), "%c%i,%" PRIx64 ",%x",
2827 // Check we haven't overwritten the end of the packet buffer
2828 assert(packet_len + 1 < (int)sizeof(packet));
2834 // Try to send the breakpoint packet, and check that it was correctly sent
2835 if (SendPacketAndWaitForResponse(packet, response, timeout) ==
2837 // Receive and OK packet when the breakpoint successfully placed
2845 // Empty packet informs us that breakpoint is not supported
2910 * qProcessInfo, qC and qfThreadInfo packets. The reply from '?' packet
2912 * be as simple as 'S05'. There is no packet which can give us pid and/or
2922 LLDB_LOG(log, "error: failed to get packet sequence mutex, not sending "
2923 "packet 'qfThreadInfo'");
3010 return Status::FromErrorString("unable to send packet");
3021 llvm::StringRef packet = stream.GetString();
3024 if (SendPacketAndWaitForResponse(packet, response) != PacketResult::Success)
3025 return Status::FromErrorStringWithFormat("failed to send '%s' packet",
3026 packet.str().c_str());
3029 return Status::FromErrorStringWithFormat("invalid response to '%s' packet",
3030 packet.str().c_str());
3044 llvm::StringRef packet = stream.GetString();
3047 if (SendPacketAndWaitForResponse(packet, response) != PacketResult::Success)
3048 return Status::FromErrorStringWithFormat("failed to send '%s' packet",
3052 return Status::FromErrorStringWithFormat("invalid response to '%s' packet",
3220 error = Status::FromErrorStringWithFormat("failed to send '%s' packet",
3227 "invalid response to '%s' packet", stream.GetData());
3324 error = Status::FromErrorString("failed to send vFile:pwrite packet");
3358 error = Status::FromErrorString("failed to send vFile:symlink packet");
3389 error = Status::FromErrorString("failed to send vFile:unlink packet");
3445 // would consume the whole response packet which would give incorrect
3628 StreamString packet;
3630 packet.Printf("QSyncThreadState:%4.4" PRIx64 ";", tid);
3631 return SendPacketAndWaitForResponse(packet.GetString(), response) ==
3656 LLDB_LOG(log, "failed to send packet: jLLDBTraceSupported");
3658 "failed to send packet: jLLDBTraceSupported");
3689 LLDB_LOG(log, "failed to send packet: jLLDBTraceStop");
3691 "failed to send packet: jLLDBTraceStop '%s'",
3723 LLDB_LOG(log, "failed to send packet: jLLDBTraceStart");
3725 "failed to send packet: jLLDBTraceStart '%s'",
3755 LLDB_LOG(log, "failed to send packet: jLLDBTraceGetState");
3758 "failed to send packet: jLLDBTraceGetState '%s'",
3786 LLDB_LOG(log, "failed to send packet: jLLDBTraceGetBinaryData");
3789 "failed to send packet: jLLDBTraceGetBinaryData '%s'",
3843 StreamString packet;
3844 packet.PutCString("qModuleInfo:");
3845 packet.PutStringAsRawHex8(module_path);
3846 packet.PutCString(";");
3848 packet.PutStringAsRawHex8(triple);
3851 if (SendPacketAndWaitForResponse(packet.GetString(), response) !=
3954 // Increase the timeout for jModulesInfo since this packet can take longer.
3987 // query the target remote for extended information using the qXfer packet
4009 // send query extended feature packet
4010 std::string packet =
4016 SendPacketAndWaitForResponse(packet, chunk);
4021 "Error sending $qXfer packet");
4024 // check packet code
4041 "Invalid continuation code from $qXfer packet");
4049 // packet: "qSymbol::"
4055 // packet
4093 // Is this the initial qSymbol:: packet?
4099 StreamString packet;
4100 packet.PutCString("qSymbol::");
4102 while (SendPacketAndWaitForResponseNoLock(packet.GetString(), response) ==
4175 // and we want to send a packet with the new symbol value and see
4178 // Change "packet" to contain the requested symbol value and name
4179 packet.Clear();
4180 packet.PutCString("qSymbol:");
4182 packet.Printf("%" PRIx64, symbol_load_addr);
4187 packet.PutCString(":");
4188 packet.PutBytesAsRawHex8(symbol_name.data(), symbol_name.size());
4189 continue; // go back to the while loop and send "packet" and wait
4195 // If we make it here, the symbol request packet response wasn't valid or
4256 // Format packet:
4259 std::string packet = formatv("QPassSignals:{0:$[;]@(x-2)}", range).str();
4262 auto send_status = SendPacketAndWaitForResponse(packet, response);
4265 return Status::FromErrorString("Sending QPassSignals packet failed");
4271 "Unknown error happened during sending QPassSignals packet.");
4301 // Send the packet.
4317 "configuring StructuredData feature {0} failed when sending packet: "
4347 "failed to send k packet");
4354 "unexpected response to k packet: %s",