GDBserver

Functions | Variables
rsp-low.c File Reference
`#include "common-defs.h"`
`#include "rsp-low.h"`

Go to the source code of this file.

## Functions
int | fromhex (int a)
int | tohex (int nib)
static int | ishex (int ch, int *val)
char * | pack_nibble (char *buf, int nibble)
char * | pack_hex_byte (char *pkt, int byte)
const char * | unpack_varlen_hex (const char *buff, ULONGEST *result)
int | hex2bin (const char *hex, gdb_byte *bin, int count)
gdb::byte_vector | hex2bin (const char *hex)
std::string | hex2str (const char *hex)
int | bin2hex (const gdb_byte *bin, char *hex, int count)
std::string | bin2hex (const gdb_byte *bin, int count)
static int | needs_escaping (gdb_byte b)
int | remote_escape_output (const gdb_byte *buffer, int len_units, int unit_size, gdb_byte *out_buf, int *out_len_units, int out_maxlen_bytes)
int | remote_unescape_input (const gdb_byte *buffer, int len, gdb_byte *out_buf, int out_maxlen)

## Variables
static const char | hexchars [] = "0123456789abcdef"

## Function Documentation

## ◆ bin2hex() [1/2]

int bin2hex | ( | const gdb_byte * | bin,
|  | char * | hex,
|  | int | count
| ) |  |

Definition at line 173 of file rsp-low.c.

References tohex().

Referenced by cmd_qtbuffer(), cmd_qtstatus(), collect_register_as_string(), gdb_unparse_agent_expr(), handle_qxfer_threads_worker(), look_up_one_symbol(), monitor_output(), prepare_resume_reply(), process_serial_event(), registers_to_string(), relocate_instruction(), response_source(), and response_tsv().

## ◆ bin2hex() [2/2]

std::string bin2hex | ( | const gdb_byte * | bin,
|  | int | count
| ) |  |

Definition at line 189 of file rsp-low.c.

References string, and tohex().

## ◆ fromhex()

int fromhex | ( | int | a | ) |

Definition at line 26 of file rsp-low.c.

References _, and error().

Referenced by decode_address(), decode_m_packet(), decode_M_packet(), decode_X_packet(), decode_xfer_write(), getpkt(), hex2bin(), and hex2str().

## ◆ hex2bin() [1/2]

int hex2bin | ( | const char * | hex,
|  | gdb_byte * | bin,
|  | int | count
| ) |  |

Definition at line 115 of file rsp-low.c.

References fromhex().

Referenced by cmd_qtdpsrc(), cmd_qtdv(), cmd_qtnotes(), decode_M_packet(), gdb_parse_agent_expr(), handle_query(), handle_v_run(), hex2bin(), process_serial_event(), and registers_from_string().

## ◆ hex2bin() [2/2]

gdb::byte_vector hex2bin | ( | const char * | hex | ) |

Definition at line 136 of file rsp-low.c.

References hex2bin().

## ◆ hex2str()

std::string hex2str | ( | const char * | hex | ) |

Definition at line 149 of file rsp-low.c.

References fromhex(), and string.

Referenced by handle_general_set().

## ◆ ishex()

static int ishex | ( | int | ch,
|  | int * | val
| ) |  |
| static

Definition at line 54 of file rsp-low.c.

Referenced by unpack_varlen_hex().

## ◆ needs_escaping()

static int needs_escaping | ( | gdb_byte | b | ) |
| static

Definition at line 206 of file rsp-low.c.

Referenced by remote_escape_output().

## ◆ pack_hex_byte()

char* pack_hex_byte | ( | char * | pkt,
|  | int | byte
| ) |  |

Definition at line 86 of file rsp-low.c.

References hexchars.

## ◆ pack_nibble()

char* pack_nibble | ( | char * | buf,
|  | int | nibble
| ) |  |

Definition at line 77 of file rsp-low.c.

References hexchars.

## ◆ remote_escape_output()

int remote_escape_output | ( | const gdb_byte * | buffer,
|  | int | len_units,
|  | int | unit_size,
|  | gdb_byte * | out_buf,
|  | int * | out_len_units,
|  | int | out_maxlen_bytes
| ) |  |

Definition at line 214 of file rsp-low.c.

References needs_escaping().

Referenced by write_qxfer_response().

## ◆ remote_unescape_input()

int remote_unescape_input | ( | const gdb_byte * | buffer,
|  | int | len,
|  | gdb_byte * | out_buf,
|  | int | out_maxlen
| ) |  |

Definition at line 269 of file rsp-low.c.

References _, and error().

Referenced by decode_search_memory_packet(), decode_X_packet(), and decode_xfer_write().

## ◆ tohex()

int tohex | ( | int | nib | ) |

Definition at line 41 of file rsp-low.c.

Referenced by bin2hex(), outreg(), prepare_resume_reply(), and putpkt_binary_1().

## ◆ unpack_varlen_hex()

const char* unpack_varlen_hex | ( | const char * | buff,
|  | ULONGEST * | result
| ) |  |

Definition at line 96 of file rsp-low.c.

References ishex().

Referenced by add_tracepoint_action(), cmd_bigqtbuffer_circular(), cmd_bigqtbuffer_size(), cmd_qtbuffer(), cmd_qtdisconnected(), cmd_qtdp(), cmd_qtdpsrc(), cmd_qtdv(), cmd_qtenable_disable(), cmd_qtframe(), cmd_qtp(), cmd_qtro(), cmd_qtv(), gdb_parse_agent_expr(), handle_general_set(), handle_query(), handle_qxfer_exec_file(), handle_v_cont(), hex_or_minus_one(), process_serial_event(), read_ptid(), and relocate_instruction().

## Variable Documentation

## ◆ hexchars

const char hexchars[] = "0123456789abcdef"
| static

Definition at line 51 of file rsp-low.c.

Referenced by pack_hex_byte(), and pack_nibble().