summary refs log tree commit diff stats
path: root/gdbstub
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2023-10-09 17:40:51 +0100
committerAlex Bennée <alex.bennee@linaro.org>2023-10-11 08:46:33 +0100
commit956af7daad5a97ca20f8e24d0f4d91a8fca650ad (patch)
tree07d5ea4a1e3fd36f3e7cc55daf3e633e6428a1d1 /gdbstub
parent1063693e1c503517a489e38fca489525eaea26c1 (diff)
downloadfocaccia-qemu-956af7daad5a97ca20f8e24d0f4d91a8fca650ad.tar.gz
focaccia-qemu-956af7daad5a97ca20f8e24d0f4d91a8fca650ad.zip
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 'gdbstub')
-rw-r--r--gdbstub/gdbstub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 4f3762fccf..bba2640293 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -408,11 +408,11 @@ static const char *get_feature_xml(const char *p, const char **newp,
         }
     }
     /* Is it one of the encoded gdb-xml/ files? */
-    for (int i = 0; xml_builtin[i][0]; i++) {
-        const char *name = xml_builtin[i][0];
+    for (int i = 0; gdb_static_features[i].xmlname; i++) {
+        const char *name = gdb_static_features[i].xmlname;
         if ((strncmp(name, p, len) == 0) &&
             strlen(name) == len) {
-            return xml_builtin[i][1];
+            return gdb_static_features[i].xml;
         }
     }