From: openocd-gerrit <ope...@us...> - 2024-03-16 14:42:53
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 1d076d6ce1908d5c154bfc6ee2ccd8a629853ef1 (commit) from e9df8a5102106de5a13956759ae52eb72ff68113 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1d076d6ce1908d5c154bfc6ee2ccd8a629853ef1 Author: Antonio Borneo <bor...@gm...> Date: Sat Mar 2 14:01:07 2024 +0100 openocd: dump full command line in the debug log When receiving an OpenOCD debug log to investigate about errors or issues, the first question is often about providing the complete command line to better understand the use context. Plus, when OpenOCD is lunched by an IDE, its command line is kept hidden inside the IDE, adding troubles to the user to recover it. Add the full command line directly inside the debug log. It could have been useful to also search and add in the log the full path of the OpenOCD executable, but this is not an immediate task due to portability among OS's. See, for example: https://stackoverflow.com/questions/933850 This part could be handled in a future change, if really needed. Change-Id: Ia6c5b838b9b7208bf1ecac7f95b5efc319aeabf5 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8170 Tested-by: jenkins Reviewed-by: Paul Fertser <fer...@gm...> diff --git a/src/helper/options.c b/src/helper/options.c index 05cde6709..61a101469 100644 --- a/src/helper/options.c +++ b/src/helper/options.c @@ -341,6 +341,10 @@ int parse_cmdline_args(struct command_context *cmd_ctx, int argc, char *argv[]) exit(0); } + /* dump full command line */ + for (int i = 0; i < argc; i++) + LOG_DEBUG("ARGV[%d] = \"%s\"", i, argv[i]); + /* paths specified on the command line take precedence over these * built-in paths */ ----------------------------------------------------------------------- Summary of changes: src/helper/options.c | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- Main OpenOCD repository |