#include "config.h"
#endif
-#if BUILD_TARGET64 == 1
-
#include "breakpoints.h"
#include "mips32.h"
#include "mips64.h"
mips_mips64_examine_debug_reason(target);
LOG_DEBUG("entered debug state at PC 0x%" PRIx64 ", target->state: %s",
- *(uint64_t *)pc->value, target_state_name(target));
+ buf_get_u64(pc->value, 0, 64), target_state_name(target));
return ERROR_OK;
}
bp_num++;
if (bp_num >= mips64->num_inst_bpoints) {
- LOG_DEBUG("ERROR Can not find free FP Comparator(bpid: %d)",
+ LOG_DEBUG("ERROR Can not find free FP Comparator(bpid: %" PRIu32 ")",
bp->unique_id);
LOG_WARNING("ERROR Can not find free FP Comparator");
exit(-1);
if (retval != ERROR_OK)
return retval;
- LOG_DEBUG("bpid: %d, bp_num %i bp_value 0x%" PRIx64 "", bp->unique_id,
+ LOG_DEBUG("bpid: %" PRIu32 ", bp_num %i bp_value 0x%" PRIx64, bp->unique_id,
bp_num, c->bp_value);
return ERROR_OK;
if (bp->type == BKPT_HARD) {
retval = mips_mips64_set_hwbp(target, bp);
} else {
- LOG_DEBUG("bpid: %d", bp->unique_id);
+ LOG_DEBUG("bpid: %" PRIu32, bp->unique_id);
switch (bp->length) {
case MIPS64_SDBBP_SIZE:
* and exclude both load and store accesses from watchpoint
* condition evaluation
*/
- int enable = EJTAG_DBCn_NOSB | EJTAG_DBCn_NOLB | EJTAG_DBCn_BE
- | (0xff << EJTAG_DBCn_BLM_SHIFT);
+ int enable = EJTAG_DBCN_NOSB | EJTAG_DBCN_NOLB | EJTAG_DBCN_BE
+ | (0xff << EJTAG_DBCN_BLM_SHIFT);
if (watchpoint->set) {
LOG_WARNING("watchpoint already set");
switch (watchpoint->rw) {
case WPT_READ:
- enable &= ~EJTAG_DBCn_NOLB;
+ enable &= ~EJTAG_DBCN_NOLB;
break;
case WPT_WRITE:
- enable &= ~EJTAG_DBCn_NOSB;
+ enable &= ~EJTAG_DBCN_NOSB;
break;
case WPT_ACCESS:
- enable &= ~(EJTAG_DBCn_NOLB | EJTAG_DBCn_NOSB);
+ enable &= ~(EJTAG_DBCN_NOLB | EJTAG_DBCN_NOSB);
break;
default:
LOG_ERROR("BUG: watchpoint->rw neither read, write nor access");
bp_num = bp->set - 1;
if ((bp_num < 0) || (bp_num >= mips64->num_inst_bpoints)) {
- LOG_DEBUG("Invalid FP Comparator number in breakpoint (bpid: %d)",
+ LOG_DEBUG("Invalid FP Comparator number in breakpoint (bpid: %" PRIu32 ")",
bp->unique_id);
return ERROR_OK;
}
- LOG_DEBUG("bpid: %d - releasing hw: %d", bp->unique_id, bp_num);
+ LOG_DEBUG("bpid: %" PRIu32 " - releasing hw: %d", bp->unique_id, bp_num);
comparator_list[bp_num].used = false;
comparator_list[bp_num].bp_value = 0;
if (bp->type == BKPT_HARD) {
retval = mips_mips64_unset_hwbp(target, bp);
} else {
- LOG_DEBUG("bpid: %d", bp->unique_id);
+ LOG_DEBUG("bpid: %" PRIu32, bp->unique_id);
switch (bp->length) {
case MIPS64_SDBBP_SIZE:
retval = mips64_pracc_read_mem(ejtag_info, address, size, count,
(void *)t);
- if (ERROR_OK != retval) {
+ if (retval != ERROR_OK) {
LOG_ERROR("mips64_pracc_read_mem filed");
goto read_done;
}
.commands = mips64_commands_handlers,
};
-
-#endif /* BUILD_TARGET64 */