entry_point, exit_point, timeout_ms, arch_info);
}
-/// @returns @c true if the target has been examined.
-bool target_was_examined(struct target *target)
-{
- return target->type->examined;
-}
-/// Sets the @c examined flag for the given target.
-void target_set_examined(struct target *target)
-{
- target->type->examined = true;
-}
-// Reset the @c examined flag for the given target.
-void target_reset_examined(struct target *target)
+/**
+ * Reset the @c examined flag for the given target.
+ * Pure paranoia -- targets are zeroed on allocation.
+ */
+static void target_reset_examined(struct target *target)
{
- target->type->examined = false;
+ target->examined = false;
}
return ERROR_COMMAND_SYNTAX_ERROR;
unsigned size = 0;
- switch (CMD_NAME[2]) {
+ const char *cmd_name = CMD_NAME;
+ switch (cmd_name[6]) {
case 'w': size = 4; break;
case 'h': size = 2; break;
case 'b': size = 1; break;
bool physical=strcmp(args[0], "phys")==0;
int (*fn)(struct target *target,
uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
+ const char *cmd_name = CMD_NAME;
if (physical)
{
argc--;
struct target *target = get_current_target(cmd_ctx);
unsigned wordsize;
uint8_t value_buf[4];
- switch (CMD_NAME[2])
+ switch (cmd_name[6])
{
case 'w':
wordsize = 4;
while (watchpoint)
{
- command_print(cmd_ctx,
- "address: 0x%8.8" PRIx32 ", len: 0x%8.8x, r/w/a: %i, value: 0x%8.8" PRIx32 ", mask: 0x%8.8" PRIx32 "",
- watchpoint->address,
- watchpoint->length,
- (int)(watchpoint->rw),
- watchpoint->value,
- watchpoint->mask);
+ command_print(cmd_ctx, "address: 0x%8.8" PRIx32
+ ", len: 0x%8.8" PRIx32
+ ", r/w/a: %i, value: 0x%8.8" PRIx32
+ ", mask: 0x%8.8" PRIx32,
+ watchpoint->address,
+ watchpoint->length,
+ (int)watchpoint->rw,
+ watchpoint->value,
+ watchpoint->mask);
watchpoint = watchpoint->next;
}
return ERROR_OK;