Changeset View
Changeset View
Standalone View
Standalone View
sys/ddb/db_break.c
Show First 20 Lines • Show All 279 Lines • ▼ Show 20 Lines | |||||
db_breakpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) | db_breakpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) | ||||
{ | { | ||||
if (count == -1) | if (count == -1) | ||||
count = 1; | count = 1; | ||||
db_set_breakpoint(db_map_addr(addr), (db_addr_t)addr, count); | db_set_breakpoint(db_map_addr(addr), (db_addr_t)addr, count); | ||||
} | } | ||||
/* Delete hardware breakpoint */ | |||||
void | |||||
db_deletehbreak_cmd(db_expr_t addr, bool have_addr, db_expr_t count, | |||||
char *modif) | |||||
{ | |||||
int rc; | |||||
if (count == -1) | |||||
count = 1; | |||||
rc = db_md_clr_breakpoint(addr, count); | |||||
if (rc < 0) | |||||
jhb: You don't need the count for removing the breakpoint. The intention in DDB is that the count… | |||||
Done Inline ActionsI've reworked the breakpoint handling code to support this correctly andrew: I've reworked the breakpoint handling code to support this correctly | |||||
db_printf("hardware breakpoint could not be delete\n"); | |||||
} | |||||
/* Set hardware breakpoint */ | |||||
void | |||||
db_hbreakpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) | |||||
{ | |||||
int rc; | |||||
if (count == -1) | |||||
count = 1; | |||||
rc = db_md_set_breakpoint(addr, count); | |||||
if (rc < 0) | |||||
db_printf("hardware breakpoint could not be set\n"); | |||||
} | |||||
/* list breakpoints */ | /* list breakpoints */ | ||||
void | void | ||||
db_listbreak_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) | db_listbreak_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4) | ||||
{ | { | ||||
db_list_breakpoints(); | db_list_breakpoints(); | ||||
db_md_list_breakpoints(); | |||||
} | } | ||||
/* | /* | ||||
* We want ddb to be usable before most of the kernel has been | * We want ddb to be usable before most of the kernel has been | ||||
* initialized. In particular, current_thread() or kernel_map | * initialized. In particular, current_thread() or kernel_map | ||||
* (or both) may be null. | * (or both) may be null. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |
You don't need the count for removing the breakpoint. The intention in DDB is that the count is the "skip count" similar to 'c 10' or the like in GDB.