plugins: add an API to read registers
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 27 Feb 2024 14:43:29 +0000 (14:43 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 28 Feb 2024 09:11:42 +0000 (09:11 +0000)
commit8df5e27cf71c727a3e1bc9172819ec69eca32ff4
tree23f698e53feb070896f86812e03d3c9050dfd44f
parentc006147122dede4440c027142ce3025f64e199c0
plugins: add an API to read registers

We can only request a list of registers once the vCPU has been
initialised so the user needs to use either call the get function on
vCPU initialisation or during the translation phase.

We don't expose the reg number to the plugin instead hiding it behind
an opaque handle. For now this is just the gdb_regnum encapsulated in
an anonymous GPOINTER but in future as we add more state for plugins
to track we can expand it.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1706
Based-on:  <20231025093128.33116-18-akihiko.odaki@daynix.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240227144335.1196131-24-alex.bennee@linaro.org>
include/qemu/qemu-plugin.h
plugins/api.c
plugins/qemu-plugins.symbols