This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] RISC-V GDB Port


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]