This is an automated email from Gerrit. Tomas Vanek ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4837
-- gerrit commit 650511a78ed360cb71c7f2e3556a428f8a27226e Author: Tomas Vanek <[email protected]> Date: Tue Jan 8 00:26:39 2019 +0100 command: Log the failed command by full name Commit 44009186cfabe77fb260af221ebd6272d1e78f44 added logging of failed cmd name but it used c->name only. It might be confusing: Debug: 244 105 command.c:644 run_command(): Command 'init' failed with error code -4 User : 245 106 command.c:711 command_run_line(): Debug: 246 107 command.c:644 run_command(): Command 'init' failed with error code -4 The command on line 244 is 'dap init' Use full name of cmd including parents. Change-Id: Iff131ce6454ef70b353ce1bc6d0a480b92820545 Signed-off-by: Tomas Vanek <[email protected]> diff --git a/src/helper/command.c b/src/helper/command.c index 35c4486..b8476a6 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -639,7 +639,13 @@ static int run_command(struct command_context *context, /* we do not print out an error message because the command *should* * have printed out an error */ - LOG_DEBUG("Command '%s' failed with error code %d", c->name, retval); + char *full_name = command_name(c, ' '); + if (full_name) { + LOG_DEBUG("Command '%s' failed with error code %d", full_name, retval); + free(full_name); + } else { + LOG_DEBUG("Command failed with error code %d", retval); + } } return retval; -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
