mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
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>
This commit is contained in:
parent
1063693e1c
commit
956af7daad
7 changed files with 63 additions and 79 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue