riscv-openocd/src/helper
Antonio Borneo a47fae7934 helper/command: pass command arguments also as Jim_Obj
Some OpenOCD command gets fragment of TCL scripts as command-line
argument, fragments that will be kept and executed later on.
E.g. the command 'configure' gets the body of an OpenOCD event:
	$TARGET configure -event halted {TCL code}

These commands store the argument as a Jim_Obj and pass it to the
jimtcl interpreter when the TCL fragment has to be executed.
Using Jim_Obj as storage is relevant to let the jimtcl interpreter
to recover extra info of the TCL fragment, like the file-name and
the line-number that contain the fragment, that will be printed
out in case of run-time errors.

While converting the commands to COMMAND_HANDLER, we should avoid
storing the argument as C strings otherwise we will loose precious
info in case of run-time errors making challenging the debugging
of such TCL fragments.

Extend the struct command_invocation to contain the array that
points to the Jim_Obj of the command arguments.
This will be used while converting commands to COMMAND_HANDLER.

Change-Id: If37c5f20e9a71349f77ba1571baf1e6778e28aa5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8057
Tested-by: jenkins
2024-01-29 13:36:27 +03:00
..
Makefile.am Merge commit 'ee31f1578a333a75737bc5b183cd4ae98cdaf798' into from_upstream 2023-09-12 12:55:10 -07:00
align.h helper: add align.h 2021-08-14 13:29:43 +01:00
base64.c Add memory sample feature (#541) 2020-10-07 14:31:36 -07:00
base64.h Add memory sample feature (#541) 2020-10-07 14:31:36 -07:00
bin2char.sh helper/bin2char: drop trailing empty line 2023-12-24 14:27:23 +00:00
binarybuffer.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
binarybuffer.h openocd: src/helper: replace the GPL-2.0-or-later license tag 2022-07-23 13:54:09 +00:00
bits.h openocd: src/helper: replace the GPL-2.0-or-later license tag 2022-07-23 13:54:09 +00:00
command.c helper/command: pass command arguments also as Jim_Obj 2024-01-29 13:36:27 +03:00
command.h helper/command: pass command arguments also as Jim_Obj 2024-01-29 13:36:27 +03:00
compiler.h helper/compiler fix build with gcc on MacOS 2023-04-07 22:56:27 +00:00
configuration.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
configuration.h openocd: src/helper: replace the GPL-2.0-or-later license tag 2022-07-23 13:54:09 +00:00
crc32.c helper: Add generic little endian CRC32 function 2023-01-21 22:57:33 +00:00
crc32.h helper: Add generic little endian CRC32 function 2023-01-21 22:57:33 +00:00
fileio.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
fileio.h openocd: src/helper: replace the GPL-2.0-or-later license tag 2022-07-23 13:54:09 +00:00
jep106.c helper: with pointers, use NULL instead of 0 2023-05-05 22:09:09 +00:00
jep106.h openocd: src/helper: replace the GPL-2.0-or-later license tag 2022-07-23 13:54:09 +00:00
jep106.inc jep106: update to revision JEP106BH September 2023 2023-11-11 18:02:24 +00:00
jim-nvp.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
jim-nvp.h helper/jim-nvp: avoid camelcase error by deprecated API 2022-07-23 13:59:49 +00:00
list.h helper/list: re-align with Linux kernel 6.3-rc1 2023-04-07 21:47:34 +00:00
log.c server: gdb: export gdb_actual_connections through a function 2023-05-18 10:14:56 +00:00
log.h log: remove unused set_log_output() 2022-09-13 22:10:19 +00:00
nvp.c helper: nvp: minor fixes 2023-12-16 07:51:10 +00:00
nvp.h helper: nvp: minor fixes 2023-12-16 07:51:10 +00:00
options.c helper: with pointers, use NULL instead of 0 2023-05-05 22:09:09 +00:00
replacements.c helper: replacements: rework including replacements.h 2023-05-18 10:11:06 +00:00
replacements.h helper: replacements: rework including replacements.h 2023-05-18 10:11:06 +00:00
startup.tcl openocd: build: add SPDX tag 2022-07-23 13:06:38 +00:00
system.h openocd: src/helper: replace the GPL-2.0-or-later license tag 2022-07-23 13:54:09 +00:00
time_support.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
time_support.h openocd: src/helper: replace the GPL-2.0-or-later license tag 2022-07-23 13:54:09 +00:00
time_support_common.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
types.h helper: types: rework h_u32_to_le() and similar for sparse 2023-05-18 10:12:16 +00:00
update_jep106.pl openocd: src: replace SPDX to remaining files 2022-07-23 13:59:25 +00:00
util.c helper: util: include util.h 2023-05-05 22:08:56 +00:00
util.h openocd: src/helper: replace the GPL-2.0-or-later license tag 2022-07-23 13:54:09 +00:00