* we poll. The CPU can even halt at the current PC as a result of
* a software breakpoint being inserted by (a bug?) the application.
*/
+ /*
+ * resume() triggers the event 'resumed'. The execution of TCL commands
+ * in the event handler causes the polling of targets. If the target has
+ * already halted for a breakpoint, polling will run the 'halted' event
+ * handler before the pending 'resumed' handler.
+ * Disable polling during resume() to guarantee the execution of handlers
+ * in the correct order.
+ */
+ bool save_poll = jtag_poll_get_enabled();
+ jtag_poll_set_enabled(false);
retval = target->type->resume(target, current, address, handle_breakpoints, debug_execution);
+ jtag_poll_set_enabled(save_poll);
if (retval != ERROR_OK)
return retval;
}
enum watchpoint_rw type = WPT_ACCESS;
- uint32_t addr = 0;
+ target_addr_t addr = 0;
uint32_t length = 0;
uint32_t data_value = 0x0;
uint32_t data_mask = 0xffffffff;
/* fall through */
case 2:
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], length);
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], addr);
+ COMMAND_PARSE_ADDRESS(CMD_ARGV[0], addr);
break;
default:
if (CMD_ARGC != 1)
return ERROR_COMMAND_SYNTAX_ERROR;
- uint32_t addr;
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], addr);
+ target_addr_t addr;
+ COMMAND_PARSE_ADDRESS(CMD_ARGV[0], addr);
struct target *target = get_current_target(CMD_CTX);
watchpoint_remove(target, addr);
}
if (goi->isconfigure) {
+ /* START_DEPRECATED_TPIU */
+ if (n->value == TARGET_EVENT_TRACE_CONFIG)
+ LOG_INFO("DEPRECATED target event %s", n->name);
+ /* END_DEPRECATED_TPIU */
+
bool replace = true;
if (teap == NULL) {
/* create new */
memcpy(target->type, target_types[x], sizeof(struct target_type));
- /* will be set by "-endian" */
- target->endianness = TARGET_ENDIAN_UNKNOWN;
-
/* default to first core, override with -coreid */
target->coreid = 0;