{
int retval;
- if (bp->set) {
+ if (bp->is_set) {
LOG_WARNING("breakpoint already set");
return ERROR_OK;
}
return retval;
}
- bp->set = true;
+ bp->is_set = true;
return ERROR_OK;
}
/* set any pending breakpoints */
while (bp) {
- if (!bp->set) {
+ if (!bp->is_set) {
retval = mips_mips64_set_breakpoint(target, bp);
if (retval != ERROR_OK)
return retval;
int enable = EJTAG_DBCN_NOSB | EJTAG_DBCN_NOLB | EJTAG_DBCN_BE
| (0xff << EJTAG_DBCN_BLM_SHIFT);
- if (watchpoint->set) {
+ if (watchpoint->is_set) {
LOG_WARNING("watchpoint already set");
return ERROR_OK;
}
}
c = &cl[wp_num];
- watchpoint->set = wp_num + 1;
+ watchpoint_set(watchpoint, wp_num);
c->used = true;
c->bp_value = watchpoint->address;
/* set any pending watchpoints */
while (watchpoint) {
- if (watchpoint->set == 0) {
+ if (!watchpoint->is_set) {
retval = mips_mips64_set_watchpoint(target, watchpoint);
if (retval != ERROR_OK)
return retval;
{
struct mips64_common *mips64 = target->arch_info;
struct mips64_comparator *comparator_list = mips64->inst_break_list;
- int bp_num;
- bp_num = bp->set - 1;
+ int bp_num = bp->number;
- if ((bp_num < 0) || (bp_num >= mips64->num_inst_bpoints)) {
+ if (bp_num >= mips64->num_inst_bpoints) {
LOG_DEBUG("Invalid FP Comparator number in breakpoint (bpid: %" PRIu32 ")",
bp->unique_id);
return ERROR_OK;
/* get pointers to arch-specific information */
int retval;
- if (!bp->set) {
+ if (!bp->is_set) {
LOG_WARNING("breakpoint not set");
return ERROR_OK;
}
return retval;
}
- bp->set = false;
+ bp->is_set = false;
return ERROR_OK;
}
return ERROR_TARGET_NOT_HALTED;
}
- if (bp->set)
+ if (bp->is_set)
retval = mips_mips64_unset_breakpoint(target, bp);
if (bp->type == BKPT_HARD)
struct mips64_common *mips64 = target->arch_info;
struct mips64_comparator *comparator_list = mips64->data_break_list;
- if (!watchpoint->set) {
+ if (!watchpoint->is_set) {
LOG_WARNING("watchpoint not set");
return ERROR_OK;
}
- int wp_num = watchpoint->set - 1;
- if ((wp_num < 0) || (wp_num >= mips64->num_data_bpoints)) {
+ int wp_num = watchpoint->number;
+ if (wp_num >= mips64->num_data_bpoints) {
LOG_DEBUG("Invalid FP Comparator number in watchpoint");
return ERROR_OK;
}
comparator_list[wp_num].used = false;
comparator_list[wp_num].bp_value = 0;
target_write_u64(target, comparator_list[wp_num].reg_address + 0x18, 0);
- watchpoint->set = 0;
+ watchpoint->is_set = false;
return ERROR_OK;
}
return ERROR_TARGET_NOT_HALTED;
}
- if (watchpoint->set)
+ if (watchpoint->is_set)
retval = mips_mips64_unset_watchpoint(target, watchpoint);
mips64->num_data_bpoints_avail++;