]> www.infradead.org Git - users/borneoa/openocd-next.git/commit
target: rewrite command 'invoke-event' as COMMAND_HANDLER
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 2 Dec 2023 17:40:47 +0000 (18:40 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 19 Apr 2025 09:21:56 +0000 (09:21 +0000)
commit4a616ca4d83919fea03bf084ff326f584de558d7
tree96fbbea531477c5ac754f8bec16d08b1556c5f2f
parenta1ecf0a03d9812c285618ed995ea818eba020be3
target: rewrite command 'invoke-event' as COMMAND_HANDLER

The command shares with command 'target create' the
struct jim_nvp nvp_target_event[]

- Convert the 'struct jim_nvp' in 'struct nvp'.
- Create an alias 'struct jim_nvp' to decouple the commands
  'invoke-event' and 'target create', abusing the fact that the
  actual layout of the two struct's type is the same. This alias
  will be dropped in a following change.
- Rewrite the command 'invoke-event' and the helper function
  target_event_name().

Change-Id: I537732fe4c08042cc02bcd0f72142254d7968fa6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8826
Tested-by: jenkins
src/target/target.c