diff options
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/arm11.c | 14 | ||||
-rw-r--r-- | src/target/arm720t.c | 4 | ||||
-rw-r--r-- | src/target/arm7_9_common.c | 8 | ||||
-rw-r--r-- | src/target/arm920t.c | 12 | ||||
-rw-r--r-- | src/target/arm926ejs.c | 4 | ||||
-rw-r--r-- | src/target/arm966e.c | 4 | ||||
-rw-r--r-- | src/target/arm9tdmi.c | 4 | ||||
-rw-r--r-- | src/target/armv4_5.c | 8 | ||||
-rw-r--r-- | src/target/armv7a.c | 12 | ||||
-rw-r--r-- | src/target/armv7m.c | 12 | ||||
-rw-r--r-- | src/target/cortex_a8.c | 6 | ||||
-rw-r--r-- | src/target/cortex_m3.c | 8 | ||||
-rw-r--r-- | src/target/etb.c | 4 | ||||
-rw-r--r-- | src/target/etm.c | 24 | ||||
-rw-r--r-- | src/target/etm_dummy.c | 4 | ||||
-rw-r--r-- | src/target/oocd_trace.c | 8 | ||||
-rw-r--r-- | src/target/target.c | 54 | ||||
-rw-r--r-- | src/target/target_request.c | 4 | ||||
-rw-r--r-- | src/target/trace.c | 6 | ||||
-rw-r--r-- | src/target/xscale.c | 28 |
20 files changed, 114 insertions, 114 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c index a5175af7..66954fa7 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -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"); diff --git a/src/target/arm720t.c b/src/target/arm720t.c index f9388ab6..4ca80e19 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -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]"); diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 4c5e286c..1601ee17 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -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>"); diff --git a/src/target/arm920t.c b/src/target/arm920t.c index 0610c93c..e9278449 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -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"); diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index 24488c40..030405a5 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -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"); diff --git a/src/target/arm966e.c b/src/target/arm966e.c index 93021993..f6178758 100644 --- a/src/target/arm966e.c +++ b/src/target/arm966e.c @@ -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]"); diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index 298b26ae..f9654297 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -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] ..."); diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index da5c75a2..ec6d5a0e 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -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']]"); diff --git a/src/target/armv7a.c b/src/target/armv7a.c index 1d13779c..67638636 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -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]"); diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 88ff6f27..9fd24e9e 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -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]"); diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index 08e54601..519ba3f5 100644 --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -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"); diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 8279a8b9..47052e90 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -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>]"); diff --git a/src/target/etb.c b/src/target/etb.c index df04e406..1f44d3a2 100644 --- a/src/target/etb.c +++ b/src/target/etb.c @@ -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); diff --git a/src/target/etm.c b/src/target/etm.c index 1678c2fb..6df354a5 100644 --- a/src/target/etm.c +++ b/src/target/etm.c @@ -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; diff --git a/src/target/etm_dummy.c b/src/target/etm_dummy.c index 7621414b..2df89435 100644 --- a/src/target/etm_dummy.c +++ b/src/target/etm_dummy.c @@ -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; } diff --git a/src/target/oocd_trace.c b/src/target/oocd_trace.c index 05df2581..596a4d60 100644 --- a/src/target/oocd_trace.c +++ b/src/target/oocd_trace.c @@ -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; } diff --git a/src/target/target.c b/src/target/target.c index 55adcce6..2e933820 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -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]"); diff --git a/src/target/target_request.c b/src/target/target_request.c index 583f4c00..a02e2c12 100644 --- a/src/target/target_request.c +++ b/src/target/target_request.c @@ -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; diff --git a/src/target/trace.c b/src/target/trace.c index c038a152..c3897a07 100644 --- a/src/target/trace.c +++ b/src/target/trace.c @@ -159,12 +159,12 @@ COMMAND_HANDLER(handle_trace_history_command) int trace_register_commands(struct command_context *cmd_ctx) { struct command *trace_cmd = - register_command(cmd_ctx, NULL, "trace", NULL, COMMAND_ANY, "trace commands"); + COMMAND_REGISTER(cmd_ctx, NULL, "trace", NULL, COMMAND_ANY, "trace commands"); - register_command(cmd_ctx, trace_cmd, "history", handle_trace_history_command, + COMMAND_REGISTER(cmd_ctx, trace_cmd, "history", handle_trace_history_command, COMMAND_EXEC, "display trace history, ['clear'] history or set [size]"); - register_command(cmd_ctx, trace_cmd, "point", handle_trace_point_command, + COMMAND_REGISTER(cmd_ctx, trace_cmd, "point", handle_trace_point_command, COMMAND_EXEC, "display trace points, ['clear'] list of trace points, or add new tracepoint at [address]"); return ERROR_OK; diff --git a/src/target/xscale.c b/src/target/xscale.c index e471ac3b..c2b34931 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -3558,27 +3558,27 @@ static int xscale_register_commands(struct command_context *cmd_ctx) { struct command *xscale_cmd; - xscale_cmd = register_command(cmd_ctx, NULL, "xscale", NULL, COMMAND_ANY, "xscale specific commands"); + xscale_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "xscale", NULL, COMMAND_ANY, "xscale specific commands"); - register_command(cmd_ctx, xscale_cmd, "debug_handler", xscale_handle_debug_handler_command, COMMAND_ANY, "'xscale debug_handler <target#> <address>' command takes two required operands"); - register_command(cmd_ctx, xscale_cmd, "cache_clean_address", xscale_handle_cache_clean_address_command, COMMAND_ANY, NULL); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "debug_handler", xscale_handle_debug_handler_command, COMMAND_ANY, "'xscale debug_handler <target#> <address>' command takes two required operands"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "cache_clean_address", xscale_handle_cache_clean_address_command, COMMAND_ANY, NULL); - register_command(cmd_ctx, xscale_cmd, "cache_info", xscale_handle_cache_info_command, COMMAND_EXEC, NULL); - register_command(cmd_ctx, xscale_cmd, "mmu", xscale_handle_mmu_command, COMMAND_EXEC, "['enable'|'disable'] the MMU"); - register_command(cmd_ctx, xscale_cmd, "icache", xscale_handle_idcache_command, COMMAND_EXEC, "['enable'|'disable'] the ICache"); - register_command(cmd_ctx, xscale_cmd, "dcache", xscale_handle_idcache_command, COMMAND_EXEC, "['enable'|'disable'] the DCache"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "cache_info", xscale_handle_cache_info_command, COMMAND_EXEC, NULL); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "mmu", xscale_handle_mmu_command, COMMAND_EXEC, "['enable'|'disable'] the MMU"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "icache", xscale_handle_idcache_command, COMMAND_EXEC, "['enable'|'disable'] the ICache"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "dcache", xscale_handle_idcache_command, COMMAND_EXEC, "['enable'|'disable'] the DCache"); - register_command(cmd_ctx, xscale_cmd, "vector_catch", xscale_handle_vector_catch_command, COMMAND_EXEC, "<mask> of vectors that should be catched"); - register_command(cmd_ctx, xscale_cmd, "vector_table", xscale_handle_vector_table_command, COMMAND_EXEC, "<high|low> <index> <code> set static code for exception handler entry"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "vector_catch", xscale_handle_vector_catch_command, COMMAND_EXEC, "<mask> of vectors that should be catched"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "vector_table", xscale_handle_vector_table_command, COMMAND_EXEC, "<high|low> <index> <code> set static code for exception handler entry"); - register_command(cmd_ctx, xscale_cmd, "trace_buffer", xscale_handle_trace_buffer_command, COMMAND_EXEC, "<enable | disable> ['fill' [n]|'wrap']"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "trace_buffer", xscale_handle_trace_buffer_command, COMMAND_EXEC, "<enable | disable> ['fill' [n]|'wrap']"); - register_command(cmd_ctx, xscale_cmd, "dump_trace", xscale_handle_dump_trace_command, COMMAND_EXEC, "dump content of trace buffer to <file>"); - register_command(cmd_ctx, xscale_cmd, "analyze_trace", xscale_handle_analyze_trace_buffer_command, COMMAND_EXEC, "analyze content of trace buffer"); - register_command(cmd_ctx, xscale_cmd, "trace_image", xscale_handle_trace_image_command, + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "dump_trace", xscale_handle_dump_trace_command, COMMAND_EXEC, "dump content of trace buffer to <file>"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "analyze_trace", xscale_handle_analyze_trace_buffer_command, COMMAND_EXEC, "analyze content of trace buffer"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "trace_image", xscale_handle_trace_image_command, COMMAND_EXEC, "load image from <file> [base address]"); - register_command(cmd_ctx, xscale_cmd, "cp15", xscale_handle_cp15, COMMAND_EXEC, "access coproc 15 <register> [value]"); + COMMAND_REGISTER(cmd_ctx, xscale_cmd, "cp15", xscale_handle_cp15, COMMAND_EXEC, "access coproc 15 <register> [value]"); armv4_5_register_commands(cmd_ctx); |