On 12/05/2017 09:50 PM, Greg Clayton via lldb-dev wrote:
> 
>> On Dec 5, 2017, at 12:45 PM, Pedro Alves <pal...@redhat.com> wrote:
>>
>> On 12/05/2017 06:49 PM, Greg Clayton via lldb-dev wrote:
>>
>>> Though it does seem to be a bug that the "gdbserver" you were using doesn't 
>>> support the Target XML packets that the GDB remote protocol defines? Is 
>>> this some old version of GDB remote from many many years ago? Seems any 
>>> recent gdbserver should have this feature?
>>
>> The x86 port of gdbserver won't send back a XML target description
>> unless the client includes "xmlRegisters=i386" in the initial
>> qSupported negotiation.  (This was done at the same time support
>> for x86 XML descriptions was added in order to keep new-gdbserver
>> working against old-gdb, because the XML register layout doesn't match
>> the no-XML layout.)
> 
> Interesting! So would we add xmlRegisters=i386 to qSupported for i386 and 
> xmlRegisters=x86_64 for x86_64? We should have LLDB send this down to the 
> server then and everything would just work?

It's "xmlRegisters=i386" for both 32-bit/64-bit.

I don't know whether that's all you're missing.

I should qualify "doesn't send back" better.  To be more accurate,
without "xmlRegisters=i386" gdbserver still reports back a XML description in
response to "qXfer:features:read:target.xml".  But, that description matches the
register file/layout that predated x86 XML target descriptions.  GDB still 
connects
and debugs fine in that case (just tried it on x86_64), but the problem will be
that that description (and the resulting g/G packet layout) doesn't include all
the new registers that have been added over the years (SSE, etc.).

So sounds like there may be more to it.

Pedro Alves

_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to