Changeset View
Changeset View
Standalone View
Standalone View
sys/gdb/gdb_main.c
Show First 20 Lines • Show All 722 Lines • ▼ Show 20 Lines | gdb_trap(int type, int code) | |||||||||
prev_jb = kdb_jmpbuf(jb); | prev_jb = kdb_jmpbuf(jb); | |||||||||
if (setjmp(jb) != 0) { | if (setjmp(jb) != 0) { | |||||||||
printf("%s bailing, hopefully back to ddb!\n", __func__); | printf("%s bailing, hopefully back to ddb!\n", __func__); | |||||||||
gdb_listening = 0; | gdb_listening = 0; | |||||||||
(void)kdb_jmpbuf(prev_jb); | (void)kdb_jmpbuf(prev_jb); | |||||||||
return (1); | return (1); | |||||||||
} | } | |||||||||
gdb_listening = 0; | gdb_listening = 0; | |||||||||
cem: Do we need any delimiter between the watch and thread data? | ||||||||||
Done Inline ActionsYes, looks like there should be a ';' here. jhb: Yes, looks like there should be a ';' here. | ||||||||||
Done Inline Actions
jhb: | ||||||||||
gdb_ackmode = true; | gdb_ackmode = true; | |||||||||
/* | /* | |||||||||
* Send a T packet. We currently do not support watchpoints (the | * Send a T packet. We currently do not support watchpoints (the | |||||||||
* awatch, rwatch or watch elements). | * awatch, rwatch or watch elements). | |||||||||
*/ | */ | |||||||||
gdb_tx_begin('T'); | gdb_tx_begin('T'); | |||||||||
gdb_tx_hex(gdb_cpu_signal(type, code), 2); | gdb_tx_hex(gdb_cpu_signal(type, code), 2); | |||||||||
gdb_tx_varhex(GDB_REG_PC); | gdb_tx_varhex(GDB_REG_PC); | |||||||||
gdb_tx_char(':'); | gdb_tx_char(':'); | |||||||||
gdb_tx_reg(GDB_REG_PC); | gdb_tx_reg(GDB_REG_PC); | |||||||||
gdb_tx_char(';'); | gdb_tx_char(';'); | |||||||||
gdb_cpu_stop_reason(type, code); | ||||||||||
gdb_tx_str("thread:"); | gdb_tx_str("thread:"); | |||||||||
gdb_tx_varhex((long)kdb_thread->td_tid); | gdb_tx_varhex((uintmax_t)kdb_thread->td_tid); | |||||||||
Done Inline ActionsI might be tempted to only do the 'watch:' part in the reason function and leave the "thread" bit here FWIW. jhb: I might be tempted to only do the 'watch:' part in the reason function and leave the "thread"… | ||||||||||
gdb_tx_char(';'); | gdb_tx_char(';'); | |||||||||
gdb_tx_end(); /* XXX check error condition. */ | gdb_tx_end(); /* XXX check error condition. */ | |||||||||
thr_iter = NULL; | thr_iter = NULL; | |||||||||
while (gdb_rx_begin() == 0) { | while (gdb_rx_begin() == 0) { | |||||||||
/* printf("GDB: got '%s'\n", gdb_rxp); */ | /* printf("GDB: got '%s'\n", gdb_rxp); */ | |||||||||
switch (gdb_rx_char()) { | switch (gdb_rx_char()) { | |||||||||
case '?': /* Last signal. */ | case '?': /* Last signal. */ | |||||||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |
Do we need any delimiter between the watch and thread data?