Changeset View
Changeset View
Standalone View
Standalone View
head/sys/ddb/db_run.c
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
static bool db_sstep_print; | static bool db_sstep_print; | ||||
static int db_loop_count; | static int db_loop_count; | ||||
static int db_call_depth; | static int db_call_depth; | ||||
int db_inst_count; | int db_inst_count; | ||||
int db_load_count; | int db_load_count; | ||||
int db_store_count; | int db_store_count; | ||||
#ifdef SOFTWARE_SSTEP | |||||
db_breakpoint_t db_not_taken_bkpt = 0; | |||||
db_breakpoint_t db_taken_bkpt = 0; | |||||
#endif | |||||
#ifndef db_set_single_step | #ifndef db_set_single_step | ||||
void db_set_single_step(void); | void db_set_single_step(void); | ||||
#endif | #endif | ||||
#ifndef db_clear_single_step | #ifndef db_clear_single_step | ||||
void db_clear_single_step(void); | void db_clear_single_step(void); | ||||
#endif | #endif | ||||
#ifndef db_pc_is_singlestep | |||||
static bool | |||||
db_pc_is_singlestep(db_addr_t pc) | |||||
{ | |||||
#ifdef SOFTWARE_SSTEP | #ifdef SOFTWARE_SSTEP | ||||
db_breakpoint_t db_not_taken_bkpt = 0; | if ((db_not_taken_bkpt != 0 && pc == db_not_taken_bkpt->address) | ||||
db_breakpoint_t db_taken_bkpt = 0; | || (db_taken_bkpt != 0 && pc == db_taken_bkpt->address)) | ||||
return (true); | |||||
#endif | #endif | ||||
return (false); | |||||
} | |||||
#endif | |||||
bool | bool | ||||
db_stop_at_pc(bool *is_breakpoint) | db_stop_at_pc(bool *is_breakpoint) | ||||
{ | { | ||||
db_addr_t pc; | db_addr_t pc; | ||||
db_breakpoint_t bkpt; | db_breakpoint_t bkpt; | ||||
pc = PC_REGS(); | pc = PC_REGS(); | ||||
#ifdef SOFTWARE_SSTEP | |||||
if ((db_not_taken_bkpt != 0 && pc == db_not_taken_bkpt->address) | if (db_pc_is_singlestep(pc)) | ||||
|| (db_taken_bkpt != 0 && pc == db_taken_bkpt->address)) | |||||
*is_breakpoint = false; | *is_breakpoint = false; | ||||
#endif | |||||
db_clear_single_step(); | db_clear_single_step(); | ||||
db_clear_breakpoints(); | db_clear_breakpoints(); | ||||
db_clear_watchpoints(); | db_clear_watchpoints(); | ||||
#ifdef FIXUP_PC_AFTER_BREAK | #ifdef FIXUP_PC_AFTER_BREAK | ||||
if (*is_breakpoint) { | if (*is_breakpoint) { | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 277 Lines • Show Last 20 Lines |