qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Abdallah Bouassida <abdallah.bouassida@lauterbach.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	Khaled Jmal <khaled.jmal@lauterbach.com>
Subject: Re: [Qemu-devel] [PATCH v6 3/3] target/arm: Add the XML dynamic generation
Date: Thu, 03 May 2018 12:54:08 +0100	[thread overview]
Message-ID: <8736z99cpr.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA8QoZdiCxRic9Ztekyi-e5hGwUSPUrbUmW_d2B9vJgYEg@mail.gmail.com>


Peter Maydell <peter.maydell@linaro.org> writes:

> On 3 May 2018 at 11:19, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> Abdallah Bouassida <abdallah.bouassida@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.bouassida@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

  reply	other threads:[~2018-05-03 11:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 15:56 [Qemu-devel] [PATCH v6 0/3] target/arm: Add a dynamic XML-description of the cp-registers to GDB Abdallah Bouassida
2018-04-19 15:56 ` [Qemu-devel] [PATCH v6 1/3] target/arm: Add "ARM_CP_NO_GDB" as a new bit field for ARMCPRegInfo type Abdallah Bouassida
2018-04-19 15:56 ` [Qemu-devel] [PATCH v6 2/3] target/arm: Add "_S" suffix to the secure version of a sysreg Abdallah Bouassida
2018-04-19 15:56 ` [Qemu-devel] [PATCH v6 3/3] target/arm: Add the XML dynamic generation Abdallah Bouassida
2018-05-03 10:19   ` Alex Bennée
2018-05-03 10:26     ` Peter Maydell
2018-05-03 11:54       ` Alex Bennée [this message]
2018-05-02 13:31 ` [Qemu-devel] ping Re: [PATCH v6 0/3] target/arm: Add a dynamic XML-description of the cp-registers to GDB Abdallah Bouassida
2018-05-03 19:48 ` [Qemu-devel] " Alex Bennée
2018-05-04  8:12   ` Abdallah Bouassida
2018-05-04  8:22   ` Peter Maydell
2018-05-10 13:12 ` Alex Bennée
2018-05-15 12:03   ` Peter Maydell
2018-05-16  9:03     ` Alex Bennée
2018-05-17 15:23       ` Peter Maydell
2018-05-18 10:35         ` Abdallah Bouassida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736z99cpr.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=abdallah.bouassida@lauterbach.com \
    --cc=khaled.jmal@lauterbach.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).