struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target);
(*cache_p) = armv4_5_build_reg_cache(target, armv4_5);
- armv4_5->core_cache = (*cache_p);
}
int arm9tdmi_init_target(struct command_context *cmd_ctx,
COMMAND_HANDLER(handle_arm9tdmi_catch_vectors_command)
{
- struct target *target = get_current_target(cmd_ctx);
+ struct target *target = get_current_target(CMD_CTX);
struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
struct reg *vector_catch;
uint32_t vector_catch_value;
/* it's uncommon, but some ARM7 chips can support this */
if (arm7_9->common_magic != ARM7_9_COMMON_MAGIC
|| !arm7_9->has_vector_catch) {
- command_print(cmd_ctx, "target doesn't have EmbeddedICE "
+ command_print(CMD_CTX, "target doesn't have EmbeddedICE "
"with vector_catch");
return ERROR_TARGET_INVALID;
}
if (CMD_ARGC > 0)
{
vector_catch_value = 0x0;
- if (strcmp(args[0], "all") == 0)
+ if (strcmp(CMD_ARGV[0], "all") == 0)
{
vector_catch_value = 0xdf;
}
- else if (strcmp(args[0], "none") == 0)
+ else if (strcmp(CMD_ARGV[0], "none") == 0)
{
/* do nothing */
}
unsigned j;
for (j = 0; arm9tdmi_vectors[j].name; j++)
{
- if (strcmp(args[i], arm9tdmi_vectors[j].name) == 0)
+ if (strcmp(CMD_ARGV[i], arm9tdmi_vectors[j].name) == 0)
{
vector_catch_value |= arm9tdmi_vectors[j].value;
break;
/* complain if vector wasn't found */
if (!arm9tdmi_vectors[j].name)
{
- command_print(cmd_ctx, "vector '%s' not found, leaving current setting unchanged", args[i]);
+ command_print(CMD_CTX, "vector '%s' not found, leaving current setting unchanged", CMD_ARGV[i]);
/* reread current setting */
vector_catch_value = buf_get_u32(
/* output current settings */
for (unsigned i = 0; arm9tdmi_vectors[i].name; i++) {
- command_print(cmd_ctx, "%s: %s", arm9tdmi_vectors[i].name,
+ command_print(CMD_CTX, "%s: %s", arm9tdmi_vectors[i].name,
(vector_catch_value & arm9tdmi_vectors[i].value)
? "catch" : "don't catch");
}