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: [RFA 5/8] New port: TI C6x: gdb port


On 08/05/2011 01:45 AM, Pedro Alves wrote:
> On Thursday 04 August 2011 16:11:35, Joseph S. Myers wrote:
>> On Thu, 4 Aug 2011, Pedro Alves wrote:
>>
>>> Seems like there are a lot of non-core registers here.  Now that
>>> the gdbserver patch has been updated to send in standard tic6x xml
>>> register description features, all registers the target includes in the
>>> description that are not part of the defined features should not need
>>> to be hardcoded in gdb, since the xml description itself will describe
>>> their sizes and names.  See arm-tdep.c:arm_register_name for example.
>>> More comments on this further down.
>>
>> Won't GDB need a list of how the register names correspond to DWARF 
>> register numbers (which are allocated for all these registers) somewhere?
> 
> AFAICS, gdbserver only exposes A0-A15, CSR, PC, A16-A31
> B16-B31, TSR, ILC, RILC, so I assumed all other registers would be
> system dependent non general purpose control registers, but it's
> probably then that they are only not "user space" registers, and will
> be acessible by bare metal probes/stubs?  Linux programs won't access
> those, right?  I now browsed the ABI's dwarf section and I got that
> impression.

These registers you mentioned are exposed because they are accessible
via ptrace.  In bare mental probe/stub, there are more registers can be
accessed than ptrace.

> 
> The default is to assume 1-1 mapping between gdb numbers and dwarf
> numbers, so it's easier to ensure the numbers are the same.
> I guess that clears up my comment to the register numbers.
> As for names, types and sizes, if the target doesn't include those
> registers in the description, then it's as if they don't exist.  A
> description that reports those extra registers should include those
> properties (name, bitsize, type, regnum) per register, so gdb would still
> get them from the description.  I can't tell if it would make sense
> to add a new feature or features for those extra registers though.
> 

The current features of tic6x is sufficient, because they are all
registers that ptrace can access so far.  It makes no sense to list some
registers but we can't access.

Bare mental probes can access more control registers, so we may need new
feature(s), but I don't think this patch series should cover this.

-- 
Yao (éå)


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