diff options
author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-10-09 17:40:51 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2023-10-11 08:46:33 +0100 |
commit | 956af7daad5a97ca20f8e24d0f4d91a8fca650ad (patch) | |
tree | 07d5ea4a1e3fd36f3e7cc55daf3e633e6428a1d1 /include/exec | |
parent | 1063693e1c503517a489e38fca489525eaea26c1 (diff) |
gdbstub: Introduce GDBFeature structure
Before this change, the information from a XML file was stored in an
array that is not descriptive. Introduce a dedicated structure type to
make it easier to understand and to extend with more fields.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230912224107.29669-6-akihiko.odaki@daynix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231009164104.369749-13-alex.bennee@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r-- | include/exec/gdbstub.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 16a139043f..705be2c5d7 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -10,6 +10,11 @@ #define GDB_WATCHPOINT_READ 3 #define GDB_WATCHPOINT_ACCESS 4 +typedef struct GDBFeature { + const char *xmlname; + const char *xml; +} GDBFeature; + /* Get or set a register. Returns the size of the register. */ typedef int (*gdb_get_reg_cb)(CPUArchState *env, GByteArray *buf, int reg); @@ -48,7 +53,7 @@ void gdb_set_stop_cpu(CPUState *cpu); */ bool gdb_has_xml(void); -/* in gdbstub-xml.c, generated by scripts/feature_to_c.sh */ -extern const char *const xml_builtin[][2]; +/* in gdbstub-xml.c, generated by scripts/feature_to_c.py */ +extern const GDBFeature gdb_static_features[]; #endif |