[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH v6 3/3] target/arm: Add the XML dynamic generation
From: |
Alex Bennée |
Subject: |
Re: [Qemu-arm] [PATCH v6 3/3] target/arm: Add the XML dynamic generation |
Date: |
Thu, 03 May 2018 12:54:08 +0100 |
User-agent: |
mu4e 1.1.0; emacs 26.1 |
Peter Maydell <address@hidden> writes:
> On 3 May 2018 at 11:19, Alex Bennée <address@hidden> wrote:
>>
>> Abdallah Bouassida <address@hidden> 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 <address@hidden>
>>> ---
>>> 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