This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] RISC-V GDB Port
- From: Pedro Alves <palves at redhat dot com>
- To: Palmer Dabbelt <palmer at dabbelt dot com>
- Cc: qiyaoltc at gmail dot com, Andrew Waterman <andrew at sifive dot com>, gdb-patches at sourceware dot org, amodra at gmail dot com
- Date: Wed, 16 Nov 2016 19:48:40 +0000
- Subject: Re: [PATCH 1/2] RISC-V GDB Port
- Authentication-results: sourceware.org; auth=none
- References: <mhng-834536e6-1b2b-493c-ac32-580ef0c5ed89@palmer-mbp2014>
On 11/16/2016 07:40 PM, Palmer Dabbelt wrote:
> On Wed, 16 Nov 2016 11:36:29 PST (-0800), palves@redhat.com wrote:
>> On 11/14/2016 10:39 PM, Palmer Dabbelt wrote:
>>>>>>> +
>>>>>>> + /* Check any target description for validity. */
>>>>>>> + if (tdesc_has_registers (info.target_desc))
>>>>>>> + {
>>>>>
>>>>> We don't have riscv target description yet.
>>> Yes. I'm amenable to adding one, but I'm not sure how.
>>>
>>
>> You should really add them. Take a look at the ARC port,
>> which was recently added:
>>
>> https://sourceware.org/ml/gdb-patches/2016-09/msg00248.html
>
> Great, thanks -- I was looking for .dtd files, not .xml files.
dtd files are standard xml Document Type Definition files.
The dtd file in question is features/gdb-target.dtd.
I.e., the xml file you'll write follows that dtd.
> From looking at
> their port, it looks like I want to add a
>
> gdb/features/riscv.xml
Yup.
>
> patterned off of
>
> gdb/features/arc-v2.xml
>
> It looks like there's a whole bunch of examples in there, so if I'm on the
> right track I can probably figure it out.
See here too:
https://sourceware.org/gdb/onlinedocs/gdb/Target-Description-Format.html
FYI, with target descriptions, the remote stub send a target description
that includes whatever custom registers the chip has, and gdb will
include them in "info registers", etc. all without any gdb modification.
Thanks,
Pedro Alves