one line / command instead of one line per argument.
Signed-off-by: Øyvind Harboe <[email protected]>
---
src/helper/command.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/helper/command.c b/src/helper/command.c
index cf66f8a..84d687d 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -111,7 +111,7 @@ extern struct command_context *global_cmd_ctx;
void script_debug(Jim_Interp *interp, const char *name,
unsigned argc, Jim_Obj *const *argv)
{
- LOG_DEBUG("command - %s", name);
+ char * dbg = alloc_printf("command - %s", name);
for (unsigned i = 0; i < argc; i++)
{
int len;
@@ -121,8 +121,12 @@ void script_debug(Jim_Interp *interp, const char *name,
if (*w == '#')
break;
- LOG_DEBUG("%s - argv[%d]=%s", name, i, w);
+ char * t = alloc_printf("%s %s", dbg, w);
+ free (dbg);
+ dbg = t;
}
+ LOG_DEBUG("%s", dbg);
+ free(dbg);
}
static void script_command_args_free(const char **words, unsigned nwords)
--
1.6.3.3
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development