Peter Maydell <peter.mayd...@linaro.org> writes: > On 3 May 2018 at 11:19, Alex Bennée <alex.ben...@linaro.org> wrote: >> >> Abdallah Bouassida <abdallah.bouass...@lauterbach.com> writes: >> >>> Generate an XML description for the cp-regs. >>> Register these regs with the gdb_register_coprocessor(). >>> Add arm_gdb_get_sysreg() to use it as a callback to read those regs. >>> Add a dummy arm_gdb_set_sysreg(). >>> >>> Signed-off-by: Abdallah Bouassida <abdallah.bouass...@lauterbach.com> >>> --- >>> gdbstub.c | 10 +++++++ >>> include/qom/cpu.h | 5 +++- >>> target/arm/cpu.c | 1 + >>> target/arm/cpu.h | 26 ++++++++++++++++++ >>> target/arm/gdbstub.c | 76 >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> target/arm/helper.c | 26 ++++++++++++++++++ >>> 6 files changed, 143 insertions(+), 1 deletion(-) >>> >>> diff --git a/gdbstub.c b/gdbstub.c >>> index a76b2fa..4b56a43 100644 >>> --- a/gdbstub.c >>> +++ b/gdbstub.c >>> @@ -674,6 +674,16 @@ static const char *get_feature_xml(const char *p, >>> const char **newp, >>> } >>> return target_xml; >>> } >>> + if (cc->gdb_get_dynamic_xml) { >>> + CPUState *cpu = first_cpu; >>> + char *xmlname = g_strndup(p, len); >>> + const char *xml = cc->gdb_get_dynamic_xml(cpu, xmlname); >> >> Last time I asked: >> >> "although I'm confused as to why you need to g_strdup the string. You >> already have p and its not like gdb_get_dynamic_xml couldn't dup the >> string if it needed to (which it doesn't seem to)." > > ...and the answer is still the same: p is not NUL terminated.
Ahh I missed that reply... > > thanks > -- PMM -- Alex Bennée