+static const struct command_registration openocd_command_handlers[] = {
+ {
+ .name = "version",
+ .handler = &handle_version_command,
+ .mode = COMMAND_ANY,
+ .help = "show program version",
+ },
+ {
+ .name = "noinit",
+ .handler = &handle_noinit_command,
+ .mode = COMMAND_CONFIG,
+ .help = "Prevent 'init' from being called at startup.",
+ },
+ {
+ .name = "init",
+ .handler = &handle_init_command,
+ .mode = COMMAND_CONFIG,
+ .help = "Initializes configured targets and servers. "
+ "Changes command mode from CONFIG to EXEC. "
+ "Unless 'noinit' is called, this command is "
+ "called automatically at the end of startup.",
+
+ },
+ COMMAND_REGISTRATION_DONE
+};
+
+struct command_context *global_cmd_ctx;
+
+/* NB! this fn can be invoked outside this file for non PC hosted builds */
+struct command_context *setup_command_handler(Jim_Interp *interp)