summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-07 20:02:51 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-07 20:02:51 +0000
commit225ac18450830ff130e2d14a1bbceebb758a399d (patch)
treefeb4867472bd811fcc2143c9dd8093692b0a143e /src
parentcfba2f4a79d6914f7baa6986684b1143c0744a44 (diff)
downloadopenocd+libswd-225ac18450830ff130e2d14a1bbceebb758a399d.tar.gz
openocd+libswd-225ac18450830ff130e2d14a1bbceebb758a399d.tar.bz2
openocd+libswd-225ac18450830ff130e2d14a1bbceebb758a399d.tar.xz
openocd+libswd-225ac18450830ff130e2d14a1bbceebb758a399d.zip
more tcl cleanup.
git-svn-id: svn://svn.berlios.de/openocd/trunk@768 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/openocd.c8
-rw-r--r--src/tcl/commands.tcl5
2 files changed, 4 insertions, 9 deletions
diff --git a/src/openocd.c b/src/openocd.c
index 834b11d9..6bf163f5 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -381,10 +381,6 @@ static void tcl_output(void *privData, const char *file, int line, const char *f
int jim_command(command_context_t *context, char *line)
{
int retval=ERROR_OK;
- /* FIX!!!! in reality there is only one cmd_ctx handler, but consider
- what might happen here if there are multiple handlers w/reentrant callback
- fn's... shudder! */
- active_cmd_ctx=context;
int retcode=Jim_Eval(interp, line);
const char *result;
@@ -685,6 +681,8 @@ int openocd_main(int argc, char *argv[])
cfg_cmd_ctx->mode = COMMAND_CONFIG;
command_set_output_handler(cfg_cmd_ctx, configuration_output_handler, NULL);
+ active_cmd_ctx=cfg_cmd_ctx;
+
if (parse_cmdline_args(cfg_cmd_ctx, argc, argv) != ERROR_OK)
return EXIT_FAILURE;
@@ -693,6 +691,8 @@ int openocd_main(int argc, char *argv[])
if (parse_config_file(cfg_cmd_ctx) != ERROR_OK)
return EXIT_FAILURE;
+ active_cmd_ctx=cmd_ctx;
+
command_done(cfg_cmd_ctx);
if (command_run_line(cmd_ctx, "init")!=ERROR_OK)
diff --git a/src/tcl/commands.tcl b/src/tcl/commands.tcl
index a272c134..a2cf0812 100644
--- a/src/tcl/commands.tcl
+++ b/src/tcl/commands.tcl
@@ -1,9 +1,4 @@
-# implements Tcl procedures/functions
-proc peek {address} {
- return [openocd_throw "mdw $address"]
-}
-
# Production command
# FIX!!! need to figure out how to feed back relevant output
# from e.g. "flash banks" command...