[PATCH 02/25] Adjust the order of 32bit-linux.xml and 32bit-sse.xml in i386/i386-linux.xml

Pedro Alves palves@redhat.com
Mon Jun 19 21:56:00 GMT 2017


On 06/19/2017 10:48 PM, Simon Marchi wrote:
> On 2017-06-19 23:24, Pedro Alves wrote:
>> Unless this is a case of a default target description matching
>> the layout of targets that predated support for XML descriptions.
>>
>> Could that be the case here?  From:
>>
>> static void
>> i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
>> {
>> ...
>>   if (! tdesc_has_registers (tdesc))
>>     tdesc = tdesc_i386_linux;
>> ...
>>
>> ... it may well be.  So we need to tread carefully here.  The
>> order may be required for back compatibility.  A deeper audit
>> with that in mind is in order.

> Do you mean that this might impact backward compatibility with older
> gdbservers (or other remotes) that don't send XML target descriptions
> and just assume a certain "well-known" register numbering?

Yes.

It may be easy to check against gdbserver.  You'd need to hack it to
disable the x86 xml tdesc support, which is a relatively
recent addition.  [It took a while for the x86 port to support xml
tdescs].  The xmlRegisters= qSupported feature had to invented to
keep backward compatibility back then.

E.g., hack gdb's remote.c:register_remote_support_xml, or
gdbserver's linux-x86-low.c:x86_linux_process_qsupported.
If, with x86 XML support disabled, before vs after patch the
layout of GDB's g/G packet buffer changes, then you have
a back compatibility break.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list