From 5576a6240a103879e1a8d9d4c2b6ff4aee0d23fa Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Tue, 1 Dec 2009 08:41:41 +0100 Subject: command: the Jim interpreter can now be provided rather than created MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In embedded hosts, the Jim interpreter can come from the existing context rather than be created by OpenOCD. Signed-off-by: Øyvind Harboe --- src/openocd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/openocd.c') diff --git a/src/openocd.c b/src/openocd.c index 22d45828..44e02925 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -188,14 +188,14 @@ static const struct command_registration openocd_command_handlers[] = { 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(void) +struct command_context *setup_command_handler(Jim_Interp *interp) { log_init(); LOG_DEBUG("log_init: complete"); struct command_context *cmd_ctx; - global_cmd_ctx = cmd_ctx = command_init(openocd_startup_tcl); + global_cmd_ctx = cmd_ctx = command_init(openocd_startup_tcl, interp); register_commands(cmd_ctx, NULL, openocd_command_handlers); /* register subsystem commands */ @@ -242,7 +242,7 @@ int openocd_main(int argc, char *argv[]) /* initialize commandline interface */ struct command_context *cmd_ctx; - cmd_ctx = setup_command_handler(); + cmd_ctx = setup_command_handler(NULL); #if BUILD_IOUTIL if (ioutil_init(cmd_ctx) != ERROR_OK) -- cgit v1.2.3