/* Start the executable meat that can evolve into thread in future. */
ret = openocd_thread(argc, argv, cmd_ctx);
+ gdb_service_free();
+ server_free();
+
unregister_all_commands(cmd_ctx, NULL);
/* Shutdown commandline interface */
gdb_port_next = strdup("3333");
return register_commands(cmd_ctx, NULL, gdb_command_handlers);
}
+
+void gdb_service_free(void)
+{
+ free(gdb_port);
+ free(gdb_port_next);
+}
int gdb_target_add_all(struct target *target);
int gdb_register_commands(struct command_context *command_context);
+void gdb_service_free(void);
int gdb_put_packet(struct connection *connection, char *buffer, int len);
return last_signal;
}
+void server_free(void)
+{
+ tcl_service_free();
+ telnet_service_free();
+ jsp_service_free();
+}
+
void exit_on_signal(int sig)
{
#ifndef _WIN32
int server_preinit(void);
int server_init(struct command_context *cmd_ctx);
int server_quit(void);
+void server_free(void);
void exit_on_signal(int);
int server_loop(struct command_context *command_context);
tcl_port = strdup("6666");
return register_commands(cmd_ctx, NULL, tcl_command_handlers);
}
+
+void tcl_service_free(void)
+{
+ free(tcl_port);
+}
int tcl_init(void);
int tcl_register_commands(struct command_context *cmd_ctx);
+void tcl_service_free(void);
#endif /* OPENOCD_SERVER_TCL_SERVER_H */
telnet_port = strdup("4444");
return register_commands(cmd_ctx, NULL, telnet_command_handlers);
}
+
+void telnet_service_free(void)
+{
+ free(telnet_port);
+}
int telnet_init(char *banner);
int telnet_register_commands(struct command_context *command_context);
+void telnet_service_free(void);
#endif /* OPENOCD_SERVER_TELNET_SERVER_H */
return register_commands(cmd_ctx, NULL, jsp_command_handlers);
}
+void jsp_service_free(void)
+{
+ free(jsp_port);
+}
int jsp_init(struct or1k_jtag *jtag_info, char *banner);
int jsp_register_commands(struct command_context *cmd_ctx);
+void jsp_service_free(void);
#endif /* OPENOCD_TARGET_OPENRISC_JSP_SERVER_H */