command: Prepend logs during command capture

Previously, if you ran a tcl command in capture like so:
"capture { reg 0x1000 hw }"
Such command did overwrite the tcl result if LOG_LVL_INFO or
lower was logged during it.

This patch changes it by prepending the log to the tcl result instead.
As the tcl results should not be lost during capture.

Change-Id: I37381b45e15c931ba2844d65c9d38f6ed2f6e4fd
Signed-off-by: Marek Vrbka <marek.vrbka@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7902
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
This commit is contained in:
Marek Vrbka
2023-09-18 14:32:44 +02:00
committed by Antonio Borneo
parent bcaac692d0
commit 2c8c2cb6b1
2 changed files with 15 additions and 13 deletions

View File

@@ -12475,7 +12475,7 @@ Return information about the flash banks
@item @b{capture} <@var{command}>
Run <@var{command}> and return full log output that was produced during
its execution. Example:
its execution together with the command output. Example:
@example
> capture "reset init"