-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",
- NULL, COMMAND_ANY, "arm7/9 specific commands");
-
- register_command(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",
- 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",
- handle_arm7_9_dcc_downloads_command, COMMAND_ANY,
- "use DCC downloads for larger memory writes <enable | disable>");
-
- armv4_5_register_commands(cmd_ctx);
-
- etm_register_commands(cmd_ctx);
-
- return ERROR_OK;
-}
+static const struct command_registration arm7_9_any_command_handlers[] = {
+ {
+ "dbgrq",
+ .handler = &handle_arm7_9_dbgrq_command,
+ .mode = COMMAND_ANY,
+ .usage = "<enable|disable>",
+ .help = "use EmbeddedICE dbgrq instead of breakpoint "
+ "for target halt requests",
+ },
+ {
+ "fast_memory_access",
+ .handler = &handle_arm7_9_fast_memory_access_command,
+ .mode = COMMAND_ANY,
+ .usage = "<enable|disable>",
+ .help = "use fast memory accesses instead of slower "
+ "but potentially safer accesses",
+ },
+ {
+ "dcc_downloads",
+ .handler = &handle_arm7_9_dcc_downloads_command,
+ .mode = COMMAND_ANY,
+ .usage = "<enable | disable>",
+ .help = "use DCC downloads for larger memory writes",
+ },
+ COMMAND_REGISTRATION_DONE
+};
+const struct command_registration arm7_9_command_handlers[] = {
+ {
+ .chain = arm_command_handlers,
+ },
+ {
+ .chain = etm_command_handlers,
+ },
+ {
+ .name = "arm7_9",
+ .mode = COMMAND_ANY,
+ .help = "arm7/9 specific commands",
+ .chain = arm7_9_any_command_handlers,
+ },
+ COMMAND_REGISTRATION_DONE
+};