Command's output should be put in JimTcl result.
We should not anymore capture the log output and pack it as a
JimTcl result.
Remove the log capture feature in script_command_run().
This change was part of http://openocd.zylin.com/1815 from Paul
Fertser and has been extracted and rebased to simplify the review.
Change-Id: Id326c8719e1cee9156d7fc15ae8355ec79a74951
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5085
Tested-by: jenkins
}
static int script_command_run(Jim_Interp *interp,
}
static int script_command_run(Jim_Interp *interp,
- int argc, Jim_Obj * const *argv, struct command *c, bool capture)
+ int argc, Jim_Obj * const *argv, struct command *c)
{
target_call_timer_callbacks_now();
LOG_USER_N("%s", ""); /* Keep GDB connection alive*/
{
target_call_timer_callbacks_now();
LOG_USER_N("%s", ""); /* Keep GDB connection alive*/
if (NULL == words)
return JIM_ERR;
if (NULL == words)
return JIM_ERR;
- struct log_capture_state *state = NULL;
- if (capture)
- state = command_log_capture_start(interp);
-
struct command_context *cmd_ctx = current_command_context(interp);
int retval = run_command(cmd_ctx, c, (const char **)words, nwords);
struct command_context *cmd_ctx = current_command_context(interp);
int retval = run_command(cmd_ctx, c, (const char **)words, nwords);
- command_log_capture_finish(state);
-
script_command_args_free(words, nwords);
return command_retval_set(interp, retval);
}
script_command_args_free(words, nwords);
return command_retval_set(interp, retval);
}
struct command *c = interp->cmdPrivData;
assert(c);
script_debug(interp, c->name, argc, argv);
struct command *c = interp->cmdPrivData;
assert(c);
script_debug(interp, c->name, argc, argv);
- return script_command_run(interp, argc, argv, c, true);
+ return script_command_run(interp, argc, argv, c);
}
static struct command *command_root(struct command *c)
}
static struct command *command_root(struct command *c)
Jim_Obj *const *start;
unsigned count;
if (c->handler || c->jim_handler) {
Jim_Obj *const *start;
unsigned count;
if (c->handler || c->jim_handler) {
}
count = argc - remaining;
start = argv;
}
count = argc - remaining;
start = argv;
}
/* pass the command through to the intended handler */
if (c->jim_handler) {
}
/* pass the command through to the intended handler */
if (c->jim_handler) {
return (*c->jim_handler)(interp, count, start);
}
return (*c->jim_handler)(interp, count, start);
}
- return script_command_run(interp, count, start, c, found);
+ return script_command_run(interp, count, start, c);
}
static int jim_command_mode(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
}
static int jim_command_mode(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
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)