Changeset View
Changeset View
Standalone View
Standalone View
sys/gdb/netgdb.c
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | |||||
static int *netgdb_prev_kdb_inactive; | static int *netgdb_prev_kdb_inactive; | ||||
/* TODO(CEM) disable ack mode */ | /* TODO(CEM) disable ack mode */ | ||||
/* | /* | ||||
* Receive non-TX ACK packets on the client port. | * Receive non-TX ACK packets on the client port. | ||||
* | * | ||||
* The mbuf chain will have all framing headers removed (ethernet, inet, udp, | * The mbuf chain will have all framing headers removed (ethernet, inet, udp, | ||||
* debugnet). If m_pullup is used, the supplied in-out mbuf pointer should be | * debugnet). If the handler frees the mbuf chain, it should set the mbuf pointer | ||||
* updated appropriately. | |||||
* | |||||
* If the handler frees the mbuf chain, it should set the mbuf pointer | |||||
* to NULL. Otherwise, the debugnet input framework will free the | * to NULL. Otherwise, the debugnet input framework will free the | ||||
* chain. | * chain. | ||||
*/ | */ | ||||
static int | static int | ||||
netgdb_rx(struct mbuf *m) | netgdb_rx(struct mbuf *m) | ||||
{ | { | ||||
uint32_t rlen, count; | uint32_t rlen, count; | ||||
rlen = m->m_pkthdr.len; | rlen = m->m_pkthdr.len; | ||||
▲ Show 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | DB_COMMAND_FLAGS(netgdb, db_netgdb_cmd, CS_OWN) | ||||
/* | /* | ||||
* Mark that we are done in ddb(4). Return -> kdb_trap() should | * Mark that we are done in ddb(4). Return -> kdb_trap() should | ||||
* re-enter with the new backend. | * re-enter with the new backend. | ||||
*/ | */ | ||||
db_cmd_loop_done = 1; | db_cmd_loop_done = 1; | ||||
gdb_return_to_ddb = true; | gdb_return_to_ddb = true; | ||||
db_printf("(detaching GDB will return control to DDB)\n"); | db_printf("(detaching GDB will return control to DDB)\n"); | ||||
const in_addr_t *proxy_addr = debugnet_get_server(netgdb_conn); | const in_addr_t *proxy_addr = debugnet_get_server_addr(netgdb_conn); | ||||
const uint16_t proxy_port = debugnet_get_server_port(netgdb_conn) + 1; | const uint16_t proxy_port = debugnet_get_server_port(netgdb_conn) + 1; | ||||
inet_ntop(AF_INET, proxy_addr, proxy_buf, sizeof(proxy_buf)); | inet_ntop(AF_INET, proxy_addr, proxy_buf, sizeof(proxy_buf)); | ||||
if (inet_ntop(AF_INET, proxy_addr, proxy_buf, sizeof(proxy_buf)) == NULL) { | if (inet_ntop(AF_INET, proxy_addr, proxy_buf, sizeof(proxy_buf)) == NULL) { | ||||
db_printf("Connected to proxy. " | db_printf("Connected to proxy. " | ||||
"Use target remote <proxy address>:%hu to begin debugging.\n", | "Use target remote <proxy address>:%hu to begin debugging.\n", | ||||
proxy_port); | proxy_port); | ||||
} else { | } else { | ||||
db_printf("Connected to proxy. " | db_printf("Connected to proxy. " | ||||
Show All 9 Lines |