Changeset View
Changeset View
Standalone View
Standalone View
sys/gdb/gdb_int.h
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
extern int gdb_listening; | extern int gdb_listening; | ||||
void gdb_consinit(void); | void gdb_consinit(void); | ||||
extern char *gdb_rxp; | extern char *gdb_rxp; | ||||
extern size_t gdb_rxsz; | extern size_t gdb_rxsz; | ||||
extern char *gdb_txp; | extern char *gdb_txp; | ||||
extern bool gdb_ackmode; | |||||
#ifdef DDB | #ifdef DDB | ||||
/* If set, return to DDB when controlling GDB detaches. */ | /* If set, return to DDB when controlling GDB detaches. */ | ||||
extern bool gdb_return_to_ddb; | extern bool gdb_return_to_ddb; | ||||
#endif | #endif | ||||
int gdb_rx_begin(void); | int gdb_rx_begin(void); | ||||
int gdb_rx_equal(const char *); | int gdb_rx_equal(const char *); | ||||
int gdb_rx_mem(unsigned char *, size_t); | int gdb_rx_mem(unsigned char *, size_t); | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | gdb_tx_str(const char *s) | ||||
while (*s) | while (*s) | ||||
*gdb_txp++ = *s++; | *gdb_txp++ = *s++; | ||||
} | } | ||||
static __inline void | static __inline void | ||||
gdb_tx_varhex(uintmax_t n) | gdb_tx_varhex(uintmax_t n) | ||||
{ | { | ||||
gdb_txp += sprintf(gdb_txp, "%jx", n); | gdb_txp += sprintf(gdb_txp, "%jx", n); | ||||
} | |||||
static __inline void | |||||
gdb_nack(void) | |||||
{ | |||||
if (gdb_ackmode) | |||||
gdb_cur->gdb_putc('-'); | |||||
} | |||||
static __inline void | |||||
gdb_ack(void) | |||||
{ | |||||
if (gdb_ackmode) | |||||
gdb_cur->gdb_putc('+'); | |||||
} | } | ||||
#endif /* !_GDB_GDB_INT_H_ */ | #endif /* !_GDB_GDB_INT_H_ */ |