Commit 833e7f52 authored by Zachary T Welch's avatar Zachary T Welch
Browse files

use COMMAND_REGISTER macro

Replaces direct calls to register_command() with a macro, to allow
its parameters to be changed and callers updated in phases.
parent f7e1f2df
......@@ -618,11 +618,11 @@ COMMAND_HANDLER(handle_exit_command)
int telnet_register_commands(struct command_context *command_context)
{
register_command(command_context, NULL, "exit",
COMMAND_REGISTER(command_context, NULL, "exit",
&handle_exit_command, COMMAND_EXEC,
"exit telnet session");
register_command(command_context, NULL, "telnet_port",
COMMAND_REGISTER(command_context, NULL, "telnet_port",
&handle_telnet_port_command, COMMAND_ANY,
"port on which to listen for incoming telnet connections");
......
......@@ -1462,7 +1462,7 @@ static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str)
int svf_register_commands(struct command_context *cmd_ctx)
{
register_command(cmd_ctx, NULL, "svf",
COMMAND_REGISTER(cmd_ctx, NULL, "svf",
&handle_svf_command, COMMAND_EXEC,
"run svf <file>");
......
......@@ -1571,34 +1571,34 @@ static int arm11_register_commands(struct command_context *cmd_ctx)
armv4_5_register_commands(cmd_ctx);
top_cmd = register_command(cmd_ctx, NULL, "arm11",
top_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm11",
NULL, COMMAND_ANY, NULL);
/* "hardware_step" is only here to check if the default
* simulate + breakpoint implementation is broken.
* TEMPORARY! NOT DOCUMENTED!
*/
register_command(cmd_ctx, top_cmd, "hardware_step",
COMMAND_REGISTER(cmd_ctx, top_cmd, "hardware_step",
arm11_handle_bool_hardware_step, COMMAND_ANY,
"DEBUG ONLY - Hardware single stepping"
" (default: disabled)");
mw_cmd = register_command(cmd_ctx, top_cmd, "memwrite",
mw_cmd = COMMAND_REGISTER(cmd_ctx, top_cmd, "memwrite",
NULL, COMMAND_ANY, NULL);
register_command(cmd_ctx, mw_cmd, "burst",
COMMAND_REGISTER(cmd_ctx, mw_cmd, "burst",
arm11_handle_bool_memwrite_burst, COMMAND_ANY,
"Enable/Disable non-standard but fast burst mode"
" (default: enabled)");
register_command(cmd_ctx, mw_cmd, "error_fatal",
COMMAND_REGISTER(cmd_ctx, mw_cmd, "error_fatal",
arm11_handle_bool_memwrite_error_fatal, COMMAND_ANY,
"Terminate program if transfer error was found"
" (default: enabled)");
register_command(cmd_ctx, top_cmd, "step_irq_enable",
COMMAND_REGISTER(cmd_ctx, top_cmd, "step_irq_enable",
arm11_handle_bool_step_irq_enable, COMMAND_ANY,
"Enable interrupts while stepping"
" (default: disabled)");
register_command(cmd_ctx, top_cmd, "vcr",
COMMAND_REGISTER(cmd_ctx, top_cmd, "vcr",
arm11_handle_vcr, COMMAND_ANY,
"Control (Interrupt) Vector Catch Register");
......
......@@ -499,11 +499,11 @@ static int arm720t_register_commands(struct command_context *cmd_ctx)
retval = arm7_9_register_commands(cmd_ctx);
arm720t_cmd = register_command(cmd_ctx, NULL, "arm720t",
arm720t_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm720t",
NULL, COMMAND_ANY,
"arm720t specific commands");
register_command(cmd_ctx, arm720t_cmd, "cp15",
COMMAND_REGISTER(cmd_ctx, arm720t_cmd, "cp15",
arm720t_handle_cp15_command, COMMAND_EXEC,
"display/modify cp15 register <opcode> [value]");
......
......@@ -2851,18 +2851,18 @@ int arm7_9_register_commands(struct command_context *cmd_ctx)
{
struct command *arm7_9_cmd;
arm7_9_cmd = register_command(cmd_ctx, NULL, "arm7_9",
arm7_9_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm7_9",
NULL, COMMAND_ANY, "arm7/9 specific commands");
register_command(cmd_ctx, arm7_9_cmd, "dbgrq",
COMMAND_REGISTER(cmd_ctx, arm7_9_cmd, "dbgrq",
handle_arm7_9_dbgrq_command, COMMAND_ANY,
"use EmbeddedICE dbgrq instead of breakpoint "
"for target halt requests <enable | disable>");
register_command(cmd_ctx, arm7_9_cmd, "fast_memory_access",
COMMAND_REGISTER(cmd_ctx, arm7_9_cmd, "fast_memory_access",
handle_arm7_9_fast_memory_access_command, COMMAND_ANY,
"use fast memory accesses instead of slower "
"but potentially safer accesses <enable | disable>");
register_command(cmd_ctx, arm7_9_cmd, "dcc_downloads",
COMMAND_REGISTER(cmd_ctx, arm7_9_cmd, "dcc_downloads",
handle_arm7_9_dcc_downloads_command, COMMAND_ANY,
"use DCC downloads for larger memory writes <enable | disable>");
......
......@@ -1369,24 +1369,24 @@ int arm920t_register_commands(struct command_context *cmd_ctx)
retval = arm9tdmi_register_commands(cmd_ctx);
arm920t_cmd = register_command(cmd_ctx, NULL, "arm920t",
arm920t_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm920t",
NULL, COMMAND_ANY,
"arm920t specific commands");
register_command(cmd_ctx, arm920t_cmd, "cp15",
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "cp15",
arm920t_handle_cp15_command, COMMAND_EXEC,
"display/modify cp15 register <num> [value]");
register_command(cmd_ctx, arm920t_cmd, "cp15i",
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "cp15i",
arm920t_handle_cp15i_command, COMMAND_EXEC,
"display/modify cp15 (interpreted access) "
"<opcode> [value] [address]");
register_command(cmd_ctx, arm920t_cmd, "cache_info",
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "cache_info",
arm920t_handle_cache_info_command, COMMAND_EXEC,
"display information about target caches");
register_command(cmd_ctx, arm920t_cmd, "read_cache",
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "read_cache",
arm920t_handle_read_cache_command, COMMAND_EXEC,
"display I/D cache content");
register_command(cmd_ctx, arm920t_cmd, "read_mmu",
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "read_mmu",
arm920t_handle_read_mmu_command, COMMAND_EXEC,
"display I/D mmu content");
......
......@@ -764,11 +764,11 @@ int arm926ejs_register_commands(struct command_context *cmd_ctx)
retval = arm9tdmi_register_commands(cmd_ctx);
arm926ejs_cmd = register_command(cmd_ctx, NULL, "arm926ejs",
arm926ejs_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm926ejs",
NULL, COMMAND_ANY,
"arm926ejs specific commands");
register_command(cmd_ctx, arm926ejs_cmd, "cache_info",
COMMAND_REGISTER(cmd_ctx, arm926ejs_cmd, "cache_info",
arm926ejs_handle_cache_info_command, COMMAND_EXEC,
"display information about target caches");
......
......@@ -228,10 +228,10 @@ int arm966e_register_commands(struct command_context *cmd_ctx)
struct command *arm966e_cmd;
retval = arm9tdmi_register_commands(cmd_ctx);
arm966e_cmd = register_command(cmd_ctx, NULL, "arm966e",
arm966e_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm966e",
NULL, COMMAND_ANY,
"arm966e specific commands");
register_command(cmd_ctx, arm966e_cmd, "cp15",
COMMAND_REGISTER(cmd_ctx, arm966e_cmd, "cp15",
arm966e_handle_cp15_command, COMMAND_EXEC,
"display/modify cp15 register <num> [value]");
......
......@@ -914,10 +914,10 @@ int arm9tdmi_register_commands(struct command_context *cmd_ctx)
struct command *arm9tdmi_cmd;
retval = arm7_9_register_commands(cmd_ctx);
arm9tdmi_cmd = register_command(cmd_ctx, NULL, "arm9",
arm9tdmi_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm9",
NULL, COMMAND_ANY,
"arm9 specific commands");
register_command(cmd_ctx, arm9tdmi_cmd, "vector_catch",
COMMAND_REGISTER(cmd_ctx, arm9tdmi_cmd, "vector_catch",
handle_arm9tdmi_catch_vectors_command, COMMAND_EXEC,
"arm9 vector_catch [all|none|reset|undef|swi|pabt|dabt|irq|fiq] ...");
......
......@@ -790,17 +790,17 @@ int armv4_5_register_commands(struct command_context *cmd_ctx)
{
struct command *armv4_5_cmd;
armv4_5_cmd = register_command(cmd_ctx, NULL, "arm",
armv4_5_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm",
NULL, COMMAND_ANY,
"generic ARM commands");
register_command(cmd_ctx, armv4_5_cmd, "reg",
COMMAND_REGISTER(cmd_ctx, armv4_5_cmd, "reg",
handle_armv4_5_reg_command, COMMAND_EXEC,
"display ARM core registers");
register_command(cmd_ctx, armv4_5_cmd, "core_state",
COMMAND_REGISTER(cmd_ctx, armv4_5_cmd, "core_state",
handle_armv4_5_core_state_command, COMMAND_EXEC,
"display/change ARM core state <arm | thumb>");
register_command(cmd_ctx, armv4_5_cmd, "disassemble",
COMMAND_REGISTER(cmd_ctx, armv4_5_cmd, "disassemble",
handle_armv4_5_disassemble_command, COMMAND_EXEC,
"disassemble instructions "
"<address> [<count> ['thumb']]");
......
......@@ -148,26 +148,26 @@ int armv7a_register_commands(struct command_context *cmd_ctx)
{
struct command *arm_adi_v5_dap_cmd;
arm_adi_v5_dap_cmd = register_command(cmd_ctx, NULL, "dap",
arm_adi_v5_dap_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "dap",
NULL, COMMAND_ANY,
"cortex dap specific commands");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "info",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "info",
handle_dap_info_command, COMMAND_EXEC,
"dap info for ap [num], "
"default currently selected AP");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apsel",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apsel",
handle_dap_apsel_command, COMMAND_EXEC,
"select a different AP [num] (default 0)");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apid",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apid",
handle_dap_apid_command, COMMAND_EXEC,
"return id reg from AP [num], "
"default currently selected AP");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr",
handle_dap_baseaddr_command, COMMAND_EXEC,
"return debug base address from AP [num], "
"default currently selected AP");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess",
handle_dap_memaccess_command, COMMAND_EXEC,
"set/get number of extra tck for mem-ap memory "
"bus access [0-255]");
......
......@@ -800,26 +800,26 @@ int armv7m_register_commands(struct command_context *cmd_ctx)
{
struct command *arm_adi_v5_dap_cmd;
arm_adi_v5_dap_cmd = register_command(cmd_ctx, NULL, "dap",
arm_adi_v5_dap_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "dap",
NULL, COMMAND_ANY,
"cortex dap specific commands");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "info",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "info",
handle_dap_info_command, COMMAND_EXEC,
"Displays dap info for ap [num],"
"default currently selected AP");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apsel",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apsel",
handle_dap_apsel_command, COMMAND_EXEC,
"Select a different AP [num] (default 0)");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apid",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apid",
handle_dap_apid_command, COMMAND_EXEC,
"Displays id reg from AP [num], "
"default currently selected AP");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr",
handle_dap_baseaddr_command, COMMAND_EXEC,
"Displays debug base address from AP [num],"
"default currently selected AP");
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess",
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess",
handle_dap_memaccess_command, COMMAND_EXEC,
"set/get number of extra tck for mem-ap "
"memory bus access [0-255]");
......
......@@ -1634,15 +1634,15 @@ static int cortex_a8_register_commands(struct command_context *cmd_ctx)
armv4_5_register_commands(cmd_ctx);
armv7a_register_commands(cmd_ctx);
cortex_a8_cmd = register_command(cmd_ctx, NULL, "cortex_a8",
cortex_a8_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "cortex_a8",
NULL, COMMAND_ANY,
"cortex_a8 specific commands");
register_command(cmd_ctx, cortex_a8_cmd, "cache_info",
COMMAND_REGISTER(cmd_ctx, cortex_a8_cmd, "cache_info",
cortex_a8_handle_cache_info_command, COMMAND_EXEC,
"display information about target caches");
register_command(cmd_ctx, cortex_a8_cmd, "dbginit",
COMMAND_REGISTER(cmd_ctx, cortex_a8_cmd, "dbginit",
cortex_a8_handle_dbginit_command, COMMAND_EXEC,
"Initialize core debug");
......
......@@ -1919,16 +1919,16 @@ static int cortex_m3_register_commands(struct command_context *cmd_ctx)
retval = armv7m_register_commands(cmd_ctx);
cortex_m3_cmd = register_command(cmd_ctx, NULL, "cortex_m3",
cortex_m3_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "cortex_m3",
NULL, COMMAND_ANY, "cortex_m3 specific commands");
register_command(cmd_ctx, cortex_m3_cmd, "disassemble",
COMMAND_REGISTER(cmd_ctx, cortex_m3_cmd, "disassemble",
handle_cortex_m3_disassemble_command, COMMAND_EXEC,
"disassemble Thumb2 instructions <address> [<count>]");
register_command(cmd_ctx, cortex_m3_cmd, "maskisr",
COMMAND_REGISTER(cmd_ctx, cortex_m3_cmd, "maskisr",
handle_cortex_m3_mask_interrupts_command, COMMAND_EXEC,
"mask cortex_m3 interrupts ['on'|'off']");
register_command(cmd_ctx, cortex_m3_cmd, "vector_catch",
COMMAND_REGISTER(cmd_ctx, cortex_m3_cmd, "vector_catch",
handle_cortex_m3_vector_catch_command, COMMAND_EXEC,
"catch hardware vectors ['all'|'none'|<list>]");
......
......@@ -404,10 +404,10 @@ COMMAND_HANDLER(handle_etb_config_command)
static int etb_register_commands(struct command_context *cmd_ctx)
{
struct command *etb_cmd = register_command(cmd_ctx, NULL, "etb",
struct command *etb_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "etb",
NULL, COMMAND_ANY, "Embedded Trace Buffer");
register_command(cmd_ctx, etb_cmd, "config",
COMMAND_REGISTER(cmd_ctx, etb_cmd, "config",
handle_etb_config_command, COMMAND_CONFIG,
NULL);
......
......@@ -2097,9 +2097,9 @@ COMMAND_HANDLER(handle_etm_analyze_command)
int etm_register_commands(struct command_context *cmd_ctx)
{
etm_cmd = register_command(cmd_ctx, NULL, "etm", NULL, COMMAND_ANY, "Embedded Trace Macrocell");
etm_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "etm", NULL, COMMAND_ANY, "Embedded Trace Macrocell");
register_command(cmd_ctx, etm_cmd, "config", handle_etm_config_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "config", handle_etm_config_command,
COMMAND_CONFIG, "etm config <target> <port_width> <port_mode> <clocking> <capture_driver>");
return ERROR_OK;
......@@ -2107,32 +2107,32 @@ int etm_register_commands(struct command_context *cmd_ctx)
static int etm_register_user_commands(struct command_context *cmd_ctx)
{
register_command(cmd_ctx, etm_cmd, "tracemode", handle_etm_tracemode_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "tracemode", handle_etm_tracemode_command,
COMMAND_EXEC, "configure/display trace mode: "
"<none | data | address | all> "
"<context_id_bits> <cycle_accurate> <branch_output>");
register_command(cmd_ctx, etm_cmd, "info", handle_etm_info_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "info", handle_etm_info_command,
COMMAND_EXEC, "display info about the current target's ETM");
register_command(cmd_ctx, etm_cmd, "trigger_percent", handle_etm_trigger_percent_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "trigger_percent", handle_etm_trigger_percent_command,
COMMAND_EXEC, "amount (<percent>) of trace buffer to be filled after the trigger occured");
register_command(cmd_ctx, etm_cmd, "status", handle_etm_status_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "status", handle_etm_status_command,
COMMAND_EXEC, "display current target's ETM status");
register_command(cmd_ctx, etm_cmd, "start", handle_etm_start_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "start", handle_etm_start_command,
COMMAND_EXEC, "start ETM trace collection");
register_command(cmd_ctx, etm_cmd, "stop", handle_etm_stop_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "stop", handle_etm_stop_command,
COMMAND_EXEC, "stop ETM trace collection");
register_command(cmd_ctx, etm_cmd, "analyze", handle_etm_analyze_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "analyze", handle_etm_analyze_command,
COMMAND_EXEC, "anaylze collected ETM trace");
register_command(cmd_ctx, etm_cmd, "image", handle_etm_image_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "image", handle_etm_image_command,
COMMAND_EXEC, "load image from <file> [base address]");
register_command(cmd_ctx, etm_cmd, "dump", handle_etm_dump_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "dump", handle_etm_dump_command,
COMMAND_EXEC, "dump captured trace data <file>");
register_command(cmd_ctx, etm_cmd, "load", handle_etm_load_command,
COMMAND_REGISTER(cmd_ctx, etm_cmd, "load", handle_etm_load_command,
COMMAND_EXEC, "load trace data for analysis <file>");
return ERROR_OK;
......
......@@ -62,9 +62,9 @@ static int etm_dummy_register_commands(struct command_context *cmd_ctx)
{
struct command *etm_dummy_cmd;
etm_dummy_cmd = register_command(cmd_ctx, NULL, "etm_dummy", NULL, COMMAND_ANY, "Dummy ETM capture driver");
etm_dummy_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "etm_dummy", NULL, COMMAND_ANY, "Dummy ETM capture driver");
register_command(cmd_ctx, etm_dummy_cmd, "config", handle_etm_dummy_config_command, COMMAND_CONFIG, NULL);
COMMAND_REGISTER(cmd_ctx, etm_dummy_cmd, "config", handle_etm_dummy_config_command, COMMAND_CONFIG, NULL);
return ERROR_OK;
}
......
......@@ -411,12 +411,12 @@ int oocd_trace_register_commands(struct command_context *cmd_ctx)
{
struct command *oocd_trace_cmd;
oocd_trace_cmd = register_command(cmd_ctx, NULL, "oocd_trace", NULL, COMMAND_ANY, "OpenOCD + trace");
oocd_trace_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "oocd_trace", NULL, COMMAND_ANY, "OpenOCD + trace");
register_command(cmd_ctx, oocd_trace_cmd, "config", handle_oocd_trace_config_command, COMMAND_CONFIG, NULL);
COMMAND_REGISTER(cmd_ctx, oocd_trace_cmd, "config", handle_oocd_trace_config_command, COMMAND_CONFIG, NULL);
register_command(cmd_ctx, oocd_trace_cmd, "status", handle_oocd_trace_status_command, COMMAND_EXEC, "display OpenOCD + trace status");
register_command(cmd_ctx, oocd_trace_cmd, "resync", handle_oocd_trace_resync_command, COMMAND_EXEC, "resync OpenOCD + trace capture clock");
COMMAND_REGISTER(cmd_ctx, oocd_trace_cmd, "status", handle_oocd_trace_status_command, COMMAND_EXEC, "display OpenOCD + trace status");
COMMAND_REGISTER(cmd_ctx, oocd_trace_cmd, "resync", handle_oocd_trace_resync_command, COMMAND_EXEC, "resync OpenOCD + trace capture clock");
return ERROR_OK;
}
......@@ -4765,7 +4765,7 @@ static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
int target_register_commands(struct command_context *cmd_ctx)
{
register_command(cmd_ctx, NULL, "targets",
COMMAND_REGISTER(cmd_ctx, NULL, "targets",
handle_targets_command, COMMAND_EXEC,
"change current command line target (one parameter) "
"or list targets (no parameters)");
......@@ -4784,7 +4784,7 @@ int target_register_user_commands(struct command_context *cmd_ctx)
if ((retval = trace_register_commands(cmd_ctx)) != ERROR_OK)
return retval;
register_command(cmd_ctx, NULL, "profile",
COMMAND_REGISTER(cmd_ctx, NULL, "profile",
handle_profile_command, COMMAND_EXEC,
"profiling samples the CPU PC");
......@@ -4796,94 +4796,94 @@ int target_register_user_commands(struct command_context *cmd_ctx)
"convert a TCL array to memory locations and write the values "
"<ARRAYNAME> <WIDTH = 32/16/8> <ADDRESS> <COUNT>");
register_command(cmd_ctx, NULL, "fast_load_image",
COMMAND_REGISTER(cmd_ctx, NULL, "fast_load_image",
handle_fast_load_image_command, COMMAND_ANY,
"same CMD_ARGV as load_image, image stored in memory "
"- mainly for profiling purposes");
register_command(cmd_ctx, NULL, "fast_load",
COMMAND_REGISTER(cmd_ctx, NULL, "fast_load",
handle_fast_load_command, COMMAND_ANY,
"loads active fast load image to current target "
"- mainly for profiling purposes");
/** @todo don't register virt2phys() unless target supports it */
register_command(cmd_ctx, NULL, "virt2phys",
COMMAND_REGISTER(cmd_ctx, NULL, "virt2phys",
handle_virt2phys_command, COMMAND_ANY,
"translate a virtual address into a physical address");
register_command(cmd_ctx, NULL, "reg",
COMMAND_REGISTER(cmd_ctx, NULL, "reg",
handle_reg_command, COMMAND_EXEC,
"display or set a register");
register_command(cmd_ctx, NULL, "poll",
COMMAND_REGISTER(cmd_ctx, NULL, "poll",
handle_poll_command, COMMAND_EXEC,
"poll target state");
register_command(cmd_ctx, NULL, "wait_halt",
COMMAND_REGISTER(cmd_ctx, NULL, "wait_halt",
handle_wait_halt_command, COMMAND_EXEC,
"wait for target halt [time (s)]");
register_command(cmd_ctx, NULL, "halt",
COMMAND_REGISTER(cmd_ctx, NULL, "halt",
handle_halt_command, COMMAND_EXEC,
"halt target");
register_command(cmd_ctx, NULL, "resume",
COMMAND_REGISTER(cmd_ctx, NULL, "resume",
handle_resume_command, COMMAND_EXEC,
"resume target [addr]");
register_command(cmd_ctx, NULL, "reset",
COMMAND_REGISTER(cmd_ctx, NULL, "reset",
handle_reset_command, COMMAND_EXEC,
"reset target [run | halt | init] - default is run");
register_command(cmd_ctx, NULL, "soft_reset_halt",
COMMAND_REGISTER(cmd_ctx, NULL, "soft_reset_halt",
handle_soft_reset_halt_command, COMMAND_EXEC,
"halt the target and do a soft reset");
register_command(cmd_ctx, NULL, "step",
COMMAND_REGISTER(cmd_ctx, NULL, "step",
handle_step_command, COMMAND_EXEC,
"step one instruction from current PC or [addr]");
register_command(cmd_ctx, NULL, "mdw",
COMMAND_REGISTER(cmd_ctx, NULL, "mdw",
handle_md_command, COMMAND_EXEC,
"display memory words [phys] <addr> [count]");
register_command(cmd_ctx, NULL, "mdh",
COMMAND_REGISTER(cmd_ctx, NULL, "mdh",
handle_md_command, COMMAND_EXEC,
"display memory half-words [phys] <addr> [count]");
register_command(cmd_ctx, NULL, "mdb",
COMMAND_REGISTER(cmd_ctx, NULL, "mdb",
handle_md_command, COMMAND_EXEC,
"display memory bytes [phys] <addr> [count]");
register_command(cmd_ctx, NULL, "mww",
COMMAND_REGISTER(cmd_ctx, NULL, "mww",
handle_mw_command, COMMAND_EXEC,
"write memory word [phys] <addr> <value> [count]");
register_command(cmd_ctx, NULL, "mwh",
COMMAND_REGISTER(cmd_ctx, NULL, "mwh",
handle_mw_command, COMMAND_EXEC,
"write memory half-word [phys] <addr> <value> [count]");
register_command(cmd_ctx, NULL, "mwb",
COMMAND_REGISTER(cmd_ctx, NULL, "mwb",
handle_mw_command, COMMAND_EXEC,
"write memory byte [phys] <addr> <value> [count]");
register_command(cmd_ctx, NULL, "bp",
COMMAND_REGISTER(cmd_ctx, NULL, "bp",
handle_bp_command, COMMAND_EXEC,
"list or set breakpoint [<address> <length> [hw]]");
register_command(cmd_ctx, NULL, "rbp",
COMMAND_REGISTER(cmd_ctx, NULL, "rbp",
handle_rbp_command, COMMAND_EXEC,
"remove breakpoint <address>");
register_command(cmd_ctx, NULL, "wp",
COMMAND_REGISTER(cmd_ctx, NULL, "wp",
handle_wp_command, COMMAND_EXEC,
"list or set watchpoint "
"[<address> <length> <r/w/a> [value] [mask]]");
register_command(cmd_ctx, NULL, "rwp",
COMMAND_REGISTER(cmd_ctx, NULL, "rwp",
handle_rwp_command, COMMAND_EXEC,
"remove watchpoint <address>");
register_command(cmd_ctx, NULL, "load_image",
COMMAND_REGISTER(cmd_ctx, NULL, "load_image",
handle_load_image_command, COMMAND_EXEC,
"load_image <file> <address> "
"['bin'|'ihex'|'elf'|'s19'] [min_address] [max_length]");
register_command(cmd_ctx, NULL, "dump_image",
COMMAND_REGISTER(cmd_ctx, NULL, "dump_image",
handle_dump_image_command, COMMAND_EXEC,
"dump_image <file> <address> <size>");
register_command(cmd_ctx, NULL, "verify_image",
COMMAND_REGISTER(cmd_ctx, NULL, "verify_image",
handle_verify_image_command, COMMAND_EXEC,
"verify_image <file> [offset] [type]");
register_command(cmd_ctx, NULL, "test_image",
COMMAND_REGISTER(cmd_ctx, NULL, "test_image",
handle_test_image_command, COMMAND_EXEC,
"test_image <file> [offset] [type]");
......
......@@ -303,9 +303,9 @@ COMMAND_HANDLER(handle_target_request_debugmsgs_command)
int target_request_register_commands(struct command_context *cmd_ctx)
{
target_request_cmd =
register_command(cmd_ctx, NULL, "target_request", NULL, COMMAND_ANY, "target_request commands");
COMMAND_REGISTER(cmd_ctx, NULL, "target_request", NULL, COMMAND_ANY, "target_request commands");
register_command(cmd_ctx, target_request_cmd, "debugmsgs", handle_target_request_debugmsgs_command,
COMMAND_REGISTER(cmd_ctx, target_request_cmd, "debugmsgs", handle_target_request_debugmsgs_command,
COMMAND_EXEC, "enable/disable reception of debug messages from target");
return ERROR_OK;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment