#include <GdbPacket.h>
|
static uint32_t | readHexValue (const char *&data) |
| Decode a variable-length hex value, MSB first. More...
|
|
static void | encodeHexBlock (char *dst, const void *src, size_t size) |
| Encode a value as hex characters, LSB first. More...
|
|
static size_t | decodeHexBlock (void *dst, const char *&src) |
| Decode hex-encoded data block. More...
|
|
◆ GdbPacket()
◆ ~GdbPacket()
GdbPacket::~GdbPacket |
( |
| ) |
|
|
inline |
◆ decodeHexBlock()
static size_t GdbPacket::decodeHexBlock |
( |
void * |
dst, |
|
|
const char *& |
src |
|
) |
| |
|
static |
Decode hex-encoded data block.
- Parameters
-
dst | buffer for decoded hex bytes (may be same as src) |
src | source data, on return points to first character after hex data |
- Return values
-
size_t | number of decoded bytes |
- Note
- Output is always smaller than input so safe to overwrite src
◆ encodeHexBlock()
static void GdbPacket::encodeHexBlock |
( |
char * |
dst, |
|
|
const void * |
src, |
|
|
size_t |
size |
|
) |
| |
|
static |
Encode a value as hex characters, LSB first.
- Parameters
-
dst | Location for output, will NOT be nul-terminated |
src | Data bytes to encode |
size | Size of source data in bytes |
- Note
- destination buffer must have enough space for (size * 2) chars
◆ getLength()
size_t GdbPacket::getLength |
( |
| ) |
|
|
inline |
◆ readHexValue()
static uint32_t GdbPacket::readHexValue |
( |
const char *& |
data | ) |
|
|
static |
Decode a variable-length hex value, MSB first.
- Parameters
-
data | will get positioned on the end of the hex string, as far as the routine has read into it |
- Return values
-
◆ write()
void GdbPacket::write |
( |
const void * |
data, |
|
|
unsigned |
length |
|
) |
| |
Output block of data exactly as given without escaping.
◆ writeChar()
void GdbPacket::writeChar |
( |
char |
c | ) |
|
◆ writeCharEscaped()
void GdbPacket::writeCharEscaped |
( |
char |
c | ) |
|
Send a character, escaping if required.
◆ writeEscaped()
void GdbPacket::writeEscaped |
( |
const void * |
data, |
|
|
unsigned |
length |
|
) |
| |
Send a block of data, escaping as required.
◆ writeHexBlock()
void GdbPacket::writeHexBlock |
( |
const void * |
src, |
|
|
size_t |
size |
|
) |
| |
Output a block of data, hex-encoded.
- Parameters
-
◆ writeHexByte()
void GdbPacket::writeHexByte |
( |
uint8_t |
value | ) |
|
◆ writeHexWord16()
void GdbPacket::writeHexWord16 |
( |
uint16_t |
value | ) |
|
◆ writeHexWord32()
void GdbPacket::writeHexWord32 |
( |
uint32_t |
value | ) |
|
◆ writeStr()
void GdbPacket::writeStr |
( |
const char * |
str | ) |
|
Output a null-terminated string exactly as given without escaping.
◆ writeStrRef()
void GdbPacket::writeStrRef |
( |
const char * |
str | ) |
|
Output a string reference in addr/len format.
◆ writeX32()
void GdbPacket::writeX32 |
( |
| ) |
|
Output 'xxxxxxxx' to indicate undefined register value.
The documentation for this class was generated from the following file: