27 llvm::StringRef packet_ref(
m_packet);
28 if (packet_ref[3] ==
';') {
29 auto err_string = packet_ref.substr(4);
30 for (
auto e : err_string)
58 #define PACKET_MATCHES(s) \
59 ((packet_size == (sizeof(s) - 1)) && (strcmp((packet_cstr), (s)) == 0))
60 #define PACKET_STARTS_WITH(s) \
61 ((packet_size >= (sizeof(s) - 1)) && \
62 ::strncmp(packet_cstr, s, (sizeof(s) - 1)) == 0)
68 const size_t packet_size =
m_packet.size();
69 const char *packet_cstr =
m_packet.c_str();
95 switch (packet_cstr[1]) {
171 switch (packet_cstr[1]) {
187 if (packet_size == 2)
388 switch (packet_cstr[1]) {
398 if (packet_size == 1)
424 if (packet_size == 1)
441 if (packet_size == 1)
458 if (packet_cstr[1] >=
'0' && packet_cstr[1] <=
'4')
463 if (packet_cstr[1] >=
'0' && packet_cstr[1] <=
'4')
502 error.SetErrorStringWithFormat(
"Error %u", errc);
506 error.SetErrorString(error_messg);
519 if (bytes_left > 0) {
593 if (++valid_count >= 16)
610 ResponseValidatorCallback callback,
void *baton) {
638 llvm::Optional<std::pair<lldb::pid_t, lldb::tid_t>>
641 size_t initial_length = view.size();
645 if (view.consume_front(
"p")) {
647 if (view.consume_front(
"-1")) {
650 }
else if (view.consumeInteger(16, pid) || pid == 0) {
657 if (!view.consume_front(
".")) {
659 m_index += initial_length - view.size();
666 if (view.consume_front(
"-1")) {
669 }
else if (view.consumeInteger(16, tid) || tid == 0 || pid ==
AllProcesses) {
676 m_index += initial_length - view.size();