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: 6/6 [3rd try]: Add AVX support (gdbserver changes)


On Fri, Apr 2, 2010 at 10:39 AM, Daniel Jacobowitz <dan@codesourcery.com> wrote:
> On Tue, Mar 30, 2010 at 09:48:33AM -0700, H.J. Lu wrote:
>> OK to install?
>
> Pretty much OK.
>
>> +#ifdef __x86_64__
>> + ?if (num_xmm_registers == 8)
>> + ? ?init_registers_i386_linux ();
>> + ?else
>> + ? ?init_registers_amd64_linux ();
>> +#else
>> + ?init_registers_i386_linux ();
>> +#endif
>
> ...
>
>> + ?/* Update gdbserver_xmltarget with XML support. ?*/
>> +#ifdef __x86_64__
>> + ?if (num_xmm_registers == 8)
>> + ? ?gdbserver_xmltarget = "i386-linux.xml";
>> + ?else
>> + ? ?gdbserver_xmltarget = "amd64-linux.xml";
>> +#else
>> + ?gdbserver_xmltarget = "i386-linux.xml";
>> +#endif
>
> Isn't the second block redundant with the first block?

You are right. I will remove it.

>> +/* Process qSupported query, "xmlRegisters=". ?Update the buffer size for
>> + ? PTRACE_GETREGSET. ?*/
>> +
>> +static void
>> +x86_linux_process_qsupported (const char *query)
>> +{
>> + ?/* Return if gdb doesn't support XML. ?If gdb sends "xmlRegisters="
>> + ? ? in qSupported query, it supports x86 XML target descriptions. ?*/
>> + ?use_xml = query != NULL && strncmp (query, "xmlRegisters=", 13) == 0;
>> +
>> + ?x86_linux_update_xmltarget ();
>> +}
>
> Presumably, the protocol-wise correct thing to do would be to
> search for "xmlRegisters=" that had an element "x86".

I will update to check "i386", which will be sent from x86 gdb.

>
> Otherwise OK.

Thanks.

-- 
H.J.


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