This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/RFT PATCH 0/3] Add TDB regset support
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Fri, 07 Jun 2013 20:15:47 +0200
- Subject: Re: [RFA/RFT PATCH 0/3] Add TDB regset support
- References: <87fvwu5937 dot fsf at br87z6lw dot de dot ibm dot com> <51B1F629 dot 5070006 at redhat dot com> <87li6lud1m dot fsf at br87z6lw dot de dot ibm dot com> <51B20DFD dot 8040805 at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
> On 06/07/2013 04:59 PM, Andreas Arnez wrote:
>> Pedro Alves <palves@redhat.com> writes:
>>
>>> Why isn't this exposed as a new target description that includes the
>>> new register set?
>>
>> It would require extracting the hardware capabilities from the core
>> file's auxiliary vector in order to distinguish between platforms with
>> and without the transactional-execution facility. I guess it could be
>> done, but I didn't consider it that important.
>
> You might not need to look at the auxv. Return the right tdesc
> depending on presence of bfd sections. See ppc_linux_core_read_description.
This doesn't work for the TDB, because the absence of the TDB register
section doesn't mean that the core file target didn't support it. At
least we'd break the gcore.exp test case.
> If you connect a 7.6 GDB without this patch to a new GDBserver that
> sends this extended regdat, I believe GDB will complain with
> "Remote 'g' packet reply is too long", even if the target actually
> doesn't support TDB.
Hm, didn't realize that. But if the target does support TDB, we'd be in
trouble either way, right?
> You're extending the remote register buffer with an optional feature,
> and in future when another alternative register set comes along that
> replaces this one, we're in trouble, as we won't be able to tell
> which is which (without ugly hacks).
Well, the patch doesn't treat TDB as an optional feature, does it? In
the future the TDB would always be included in the target description.
Actually representing n optional register sets with different tdescs
would require 2**n tdescs, right?