From: Andreas Fritiofson Date: Thu, 17 Jun 2010 22:48:47 +0000 (+0200) Subject: don't add confusing source info to Jim X-Git-Tag: v0.5.0-rc1~579 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=127f9da4fe0a3e2eaa86c5cd32bb45b6a7083171;p=openocd don't add confusing source info to Jim When an interactive command fails, the Jim stack trace prints references to the line in "command.c" where the interpreter was invoked. Since that location has no relation to the actual command that failed, the information serves only to add confusion. By not adding the useless source info to Jim the noise can be reduced, while still printing a useful trace for nested commands. Signed-off-by: Andreas Fritiofson Signed-off-by: Øyvind Harboe --- diff --git a/src/helper/command.c b/src/helper/command.c index be262f2e..ea768b2d 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -362,7 +362,7 @@ static int register_command_handler(struct command_context *cmd_ctx, if (NULL == override_name) return JIM_ERR; - retval = Jim_Eval_Named(interp, override_name, __THIS__FILE__ , __LINE__); + retval = Jim_Eval_Named(interp, override_name, 0, 0); free((void *)override_name); return retval; @@ -651,7 +651,7 @@ int command_run_line(struct command_context *context, char *line) retcode = Jim_SetAssocData(interp, "retval", NULL, &retval); if (retcode == JIM_OK) { - retcode = Jim_Eval_Named(interp, line, __THIS__FILE__, __LINE__); + retcode = Jim_Eval_Named(interp, line, 0, 0); Jim_DeleteAssocData(interp, "retval"); }