28 llvm::StringRef packet_ref(
m_packet);
29 if (packet_ref[3] ==
';') {
30 auto err_string = packet_ref.substr(4);
31 for (
auto e : err_string)
59#define PACKET_MATCHES(s) \
60 ((packet_size == (sizeof(s) - 1)) && (strcmp((packet_cstr), (s)) == 0))
61#define PACKET_STARTS_WITH(s) \
62 ((packet_size >= (sizeof(s) - 1)) && \
63 ::strncmp(packet_cstr, s, (sizeof(s) - 1)) == 0)
69 const size_t packet_size =
m_packet.size();
70 const char *packet_cstr =
m_packet.c_str();
96 switch (packet_cstr[1]) {
172 switch (packet_cstr[1]) {
188 if (packet_size == 2)
391 switch (packet_cstr[1]) {
401 if (packet_size == 1)
427 if (packet_size == 1)
444 if (packet_size == 1)
461 if (packet_cstr[1] >=
'0' && packet_cstr[1] <=
'4')
466 if (packet_cstr[1] >=
'0' && packet_cstr[1] <=
'4')
505 error.SetErrorStringWithFormat(
"Error %u", errc);
506 std::string error_messg;
509 error.SetErrorString(error_messg);
522 if (bytes_left > 0) {
591 uint32_t valid_count = 0;
596 if (++valid_count >= 16)
613 ResponseValidatorCallback callback,
void *baton) {
641std::optional<std::pair<lldb::pid_t, lldb::tid_t>>
644 size_t initial_length = view.size();
648 if (view.consume_front(
"p")) {
650 if (view.consume_front(
"-1")) {
653 }
else if (view.consumeInteger(16, pid) || pid == 0) {
660 if (!view.consume_front(
".")) {
662 m_index += initial_length - view.size();
669 if (view.consume_front(
"-1")) {
672 }
else if (view.consumeInteger(16, tid) || tid == 0 || pid ==
AllProcesses) {
679 m_index += initial_length - view.size();
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INVALID_PROCESS_ID
@ eErrorTypeGeneric
Generic errors that can be any value.