gdbstub: Add num_regs member to GDBFeature

Currently the number of registers exposed to GDB is written as magic
numbers in code. Derive the number of registers GDB actually see from
XML files to replace the magic numbers in code later.

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>
Message-Id: <20231025093128.33116-2-akihiko.odaki@daynix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231106185112.2755262-9-alex.bennee@linaro.org>
This commit is contained in:
Akihiko Odaki 2023-11-06 18:50:58 +00:00 committed by Alex Bennée
parent 119599965e
commit 6c2313e83d
2 changed files with 45 additions and 2 deletions

View file

@ -13,6 +13,7 @@
typedef struct GDBFeature {
const char *xmlname;
const char *xml;
int num_regs;
} GDBFeature;