aboutsummaryrefslogtreecommitdiff
path: root/src/openocd.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-24 10:16:44 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-24 10:16:44 +0000
commit91a16a38101821ed8813de753a0624f892cd669c (patch)
treec6695a3ca85f76cd67f109f08c759aa9ccc33db7 /src/openocd.c
parent06d501a192e36986ba0f81c7ddff9298dd0a389e (diff)
downloadriscv-openocd-91a16a38101821ed8813de753a0624f892cd669c.zip
riscv-openocd-91a16a38101821ed8813de753a0624f892cd669c.tar.gz
riscv-openocd-91a16a38101821ed8813de753a0624f892cd669c.tar.bz2
Better handling of OpenOCD command invocation result/context.
git-svn-id: svn://svn.berlios.de/openocd/trunk@866 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/openocd.c')
-rw-r--r--src/openocd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/openocd.c b/src/openocd.c
index 6babbb8..c694b6a 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -131,11 +131,13 @@ int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **arg
return ERROR_OK;
}
+command_context_t *global_cmd_ctx;
+
command_context_t *setup_command_handler(void)
{
command_context_t *cmd_ctx;
- cmd_ctx = command_init();
+ global_cmd_ctx = cmd_ctx = command_init();
register_command(cmd_ctx, NULL, "version", handle_version_command,
COMMAND_EXEC, "show OpenOCD version");