target->variant);
}
-static int
-xscale_handle_debug_handler_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_debug_handler_command)
{
target_t *target = NULL;
xscale_common_t *xscale;
return ERROR_OK;
}
-static int
-xscale_handle_cache_clean_address_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_cache_clean_address_command)
{
target_t *target = NULL;
xscale_common_t *xscale;
return ERROR_OK;
}
-static int
-xscale_handle_cache_info_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_cache_info_command)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
return ERROR_OK;
}
-static int xscale_handle_mmu_command(command_context_t *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_mmu_command)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
return ERROR_OK;
}
-static int xscale_handle_idcache_command(command_context_t *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_idcache_command)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
- if (strcmp(cmd, "icache") == 0)
+ if (strcmp(CMD_NAME, "icache") == 0)
icache = 1;
- else if (strcmp(cmd, "dcache") == 0)
+ else if (strcmp(CMD_NAME, "dcache") == 0)
dcache = 1;
if (argc >= 1)
return ERROR_OK;
}
-static int xscale_handle_vector_catch_command(command_context_t *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_vector_catch_command)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
}
-static int xscale_handle_vector_table_command(command_context_t *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_vector_table_command)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
}
-static int
-xscale_handle_trace_buffer_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_trace_buffer_command)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
return ERROR_OK;
}
-static int
-xscale_handle_trace_image_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_trace_image_command)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
return ERROR_OK;
}
-static int xscale_handle_dump_trace_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_dump_trace_command)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
return ERROR_OK;
}
-static int
-xscale_handle_analyze_trace_buffer_command(struct command_context_s *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_analyze_trace_buffer_command)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
return ERROR_OK;
}
-static int xscale_handle_cp15(command_context_t *cmd_ctx,
- char *cmd, char **args, int argc)
+COMMAND_HANDLER(xscale_handle_cp15)
{
target_t *target = get_current_target(cmd_ctx);
struct xscale_common_s *xscale = target_to_xscale(target);
if (target->state != TARGET_HALTED)
{
- command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+ command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
uint32_t reg_no = 0;