Changeset View
Changeset View
Standalone View
Standalone View
sys/gdb/gdb_main.c
Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | nofeatures: | ||||
/* | /* | ||||
* We don't buffer framing bytes, but we do need to retain a byte for a | * We don't buffer framing bytes, but we do need to retain a byte for a | ||||
* trailing nul. | * trailing nul. | ||||
*/ | */ | ||||
gdb_tx_varhex(GDB_BUFSZ + strlen("$#nn") - 1); | gdb_tx_varhex(GDB_BUFSZ + strlen("$#nn") - 1); | ||||
gdb_tx_str(";qXfer:threads:read+"); | gdb_tx_str(";qXfer:threads:read+"); | ||||
#ifdef HAS_HW_BREAKPOINT | |||||
if ((*feat & GDB_HWBREAK) != 0) | |||||
gdb_tx_str(";hwbreak+"); | |||||
#endif | |||||
/* | /* | ||||
* If the debugport is a reliable transport, request No Ack mode from | * If the debugport is a reliable transport, request No Ack mode from | ||||
* the server. The server may or may not choose to enter No Ack mode. | * the server. The server may or may not choose to enter No Ack mode. | ||||
* https://sourceware.org/gdb/onlinedocs/gdb/Packet-Acknowledgment.html | * https://sourceware.org/gdb/onlinedocs/gdb/Packet-Acknowledgment.html | ||||
*/ | */ | ||||
if (gdb_cur->gdb_dbfeatures & GDB_DBGP_FEAT_RELIABLE) | if (gdb_cur->gdb_dbfeatures & GDB_DBGP_FEAT_RELIABLE) | ||||
gdb_tx_str(";QStartNoAckMode+"); | gdb_tx_str(";QStartNoAckMode+"); | ||||
▲ Show 20 Lines • Show All 365 Lines • ▼ Show 20 Lines | case '3': /* read watchpoint */ | ||||
error = kdb_cpu_set_watchpoint((vm_offset_t)addr, | error = kdb_cpu_set_watchpoint((vm_offset_t)addr, | ||||
(vm_size_t)length, KDB_DBG_ACCESS_R); | (vm_size_t)length, KDB_DBG_ACCESS_R); | ||||
break; | break; | ||||
case '4': /* access (RW) watchpoint */ | case '4': /* access (RW) watchpoint */ | ||||
error = kdb_cpu_set_watchpoint((vm_offset_t)addr, | error = kdb_cpu_set_watchpoint((vm_offset_t)addr, | ||||
(vm_size_t)length, KDB_DBG_ACCESS_RW); | (vm_size_t)length, KDB_DBG_ACCESS_RW); | ||||
break; | break; | ||||
case '1': /* hardware breakpoint */ | case '1': /* hardware breakpoint */ | ||||
#ifdef HAS_HW_BREAKPOINT | |||||
error = kdb_cpu_set_breakpoint((vm_offset_t)addr); | |||||
break; | |||||
#endif | |||||
case '0': /* software breakpoint */ | case '0': /* software breakpoint */ | ||||
/* Not implemented. */ | /* Not implemented. */ | ||||
gdb_tx_empty(); | gdb_tx_empty(); | ||||
return; | return; | ||||
default: | default: | ||||
error = EINVAL; | error = EINVAL; | ||||
break; | break; | ||||
} | } | ||||
Show All 28 Lines | gdb_z_remove(void) | ||||
switch (ztype) { | switch (ztype) { | ||||
case '2': /* write watchpoint */ | case '2': /* write watchpoint */ | ||||
case '3': /* read watchpoint */ | case '3': /* read watchpoint */ | ||||
case '4': /* access (RW) watchpoint */ | case '4': /* access (RW) watchpoint */ | ||||
error = kdb_cpu_clr_watchpoint((vm_offset_t)addr, | error = kdb_cpu_clr_watchpoint((vm_offset_t)addr, | ||||
(vm_size_t)length); | (vm_size_t)length); | ||||
break; | break; | ||||
case '1': /* hardware breakpoint */ | case '1': /* hardware breakpoint */ | ||||
#ifdef HAS_HW_BREAKPOINT | |||||
error = kdb_cpu_clr_breakpoint((vm_offset_t)addr); | |||||
break; | |||||
#endif | |||||
case '0': /* software breakpoint */ | case '0': /* software breakpoint */ | ||||
/* Not implemented. */ | /* Not implemented. */ | ||||
gdb_tx_empty(); | gdb_tx_empty(); | ||||
return; | return; | ||||
default: | default: | ||||
error = EINVAL; | error = EINVAL; | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 280 Lines • Show Last 20 Lines |