From 6c2a65c743a4ffae96ed27dbc38c1bf9242ed1df Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 30 Dec 2008 22:35:53 -0800 Subject: Save/restore registers to host during memory operations. Cache ROM data. Because the debug port uses instructions for most operations, the debug code will clobber registers used by the running program. Save and restore these to avoid corrupting application data. If the ROM file is known, use that to return data instead of fetching it from the target to improve performance. Signed-off-by: Keith Packard --- s51/s51.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 's51/s51.h') diff --git a/s51/s51.h b/s51/s51.h index eab61452..f4dcce66 100644 --- a/s51/s51.h +++ b/s51/s51.h @@ -27,12 +27,32 @@ enum command_result { command_success, command_debug, command_syntax, command_interrupt, command_error, }; +struct command_function { + char *name; + char *alias; + enum command_result (*func)(int argc, char **argv); + char *usage; + char *help; +}; + +struct command_function * +command_string_to_function(struct command_function *functions, char *name); + +enum command_result +command_function_help(struct command_function *functions, int argc, char **argv); + +void +command_syntax_error(int argc, char **argv); + enum command_result command_quit (int argc, char **argv); enum command_result command_help (int argc, char **argv); +enum command_result +command_stop (int argc, char **argv); + enum command_result command_di (int argc, char **argv); @@ -81,6 +101,9 @@ command_reset (int argc, char **argv); enum command_result command_status (int argc, char **argv); +enum command_result +command_info (int argc, char **argv); + enum command_result cc_wait(void); -- cgit v1.2.3