39 const char* p = (
const char*)ptr;
41 for (uint32_t offs = 0; offs < len; offs++) {
65 char out[
sizeof(val) * 2];
69 if (val ==
static_cast<uint64_t
>(-1)) {
78 for (
size_t a = 0; a <
sizeof(val); a++) {
79 uint8_t
byte =
static_cast<uint8_t
>(val & 0xFF);
85 out[nibbles++] = temp[1];
86 out[nibbles++] = temp[0];
98 if ((nibbles > 1) && (out[nibbles - 1] ==
'0')) nibbles--;
149 out = (out << 4) + nib;
162 if (sep !=
nullptr) *sep = ch;
214 data_.append(cnt - 1, *ch);
235 uint8_t* p =
reinterpret_cast<uint8_t*
>(ptr);
238 for (uint32_t offs = 0; offs < len; offs++) {
279 *str +=
static_cast<char>((nib1 << 4) + nib2);
318 AddWord8(
static_cast<uint8_t
>(error));
326 std::stringstream outstr;
338 run_xsum += chars[0];
340 run_xsum += chars[1];
347 for (
size_t offs = 0; offs <
size; ++offs) {
349 run_xsum += ptr[offs];
bool GetBlock(void *ptr, uint32_t len)
bool GetRawChar(char *ch)
const char * GetPayload() const
std::string GetPacketData() const
bool GetSequence(int32_t *seq) const
void AddWord8(uint8_t val)
void AddNumberSep(uint64_t val, char sep)
void AddBlock(const void *ptr, uint32_t len)
bool GetHexString(std::string *str)
bool GetNumberSep(uint64_t *val, char *sep)
void AddString(const char *str)
void SetSequence(int32_t seq)
bool GetWord8(uint8_t *val)
void AddHexString(const char *str)
size_t GetPayloadSize() const
bool GetString(std::string *str)
#define TRACE_GDB_REMOTE(...)
void UInt8ToHex(uint8_t byte, char chars[2])
bool NibbleToUInt8(char ch, uint8_t *byte)
bool HexToUInt8(const char chars[2], uint8_t *byte)
#define DCHECK(condition)