more tcl cleanup.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 7 Jul 2008 20:02:51 +0000 (20:02 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 7 Jul 2008 20:02:51 +0000 (20:02 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@768 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/openocd.c
src/tcl/commands.tcl

index 834b11d92fbb6c409261a010805b6118ecaba1d1..6bf163f5b040bae79a00a6a5b971dccfe8733990 100644 (file)
@@ -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;
 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;
        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);
        
        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;
 
        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;
        
        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)
        command_done(cfg_cmd_ctx);
 
        if (command_run_line(cmd_ctx, "init")!=ERROR_OK)
index a272c1342ec3e17000dcb181820f56396107dc14..a2cf0812df22e504f1af2f80d9f4a910e499ce33 100644 (file)
@@ -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...
 # Production command
 # FIX!!! need to figure out how to feed back relevant output
 # from e.g. "flash banks" command...

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)