This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: 6/6 [3rd try]: Add AVX support (gdbserver changes)
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GDB <gdb-patches at sourceware dot org>
- Date: Fri, 2 Apr 2010 13:39:30 -0400
- Subject: Re: PATCH: 6/6 [3rd try]: Add AVX support (gdbserver changes)
- References: <20100304180219.GA10826@intel.com> <20100304180408.GA10869@intel.com> <20100304180748.GC10869@intel.com> <20100304180901.GD10869@intel.com> <20100304181003.GE10869@intel.com> <20100306222250.GG21133@intel.com> <20100312172541.GB6643@intel.com> <20100329010935.GA27237@intel.com> <20100330164833.GB13521@intel.com>
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?
> +/* 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".
Otherwise OK.
--
Daniel Jacobowitz
CodeSourcery