* features/Makefile, features/arm-with-iwmmxt.xml,

features/gdbserver-regs.xsl, features/number-regs.xsl,
	features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
	* regformats/arm-with-iwmmxt.dat: Generate.
	* NEWS: Mention iWMMXt.

	* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.

	* Makefile.in (OBS): Add $(XML_BUILTIN).
	(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
	(clean): Update.
	(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
	(arm-with-iwmmxt.c): New.
	* config.in, configure: Regenerate.
	* configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
	srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
	* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
	(arm*-*-linux*): Add iWMMXt and regset support.
	* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
	(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
	(arm_store_wmmxregset, target_regsets): New.
	* server.c (get_features_xml): Take annex argument.  Check builtin
	XML documents.
	(handle_query): Handle multiple annexes.
This commit is contained in:
Daniel Jacobowitz 2007-02-08 21:39:04 +00:00
parent f3cd89f49b
commit fb1e4ffce3
20 changed files with 698 additions and 10 deletions

View file

@ -193,11 +193,27 @@ handle_general_set (char *own_buf)
}
static const char *
get_features_xml (void)
get_features_xml (const char *annex)
{
static int features_supported = -1;
static char *document;
#ifdef USE_XML
extern const char *const xml_builtin[][2];
int i;
/* Look for the annex. */
for (i = 0; xml_builtin[i][0] != NULL; i++)
if (strcmp (annex, xml_builtin[i][0]) == 0)
break;
if (xml_builtin[i][0] != NULL)
return xml_builtin[i][1];
#endif
if (strcmp (annex, "target.xml") != 0)
return NULL;
if (features_supported == -1)
{
const char *arch = (*the_target->arch_string) ();
@ -311,17 +327,24 @@ handle_query (char *own_buf, int *new_packet_len_p)
const char *document;
char *annex;
document = get_features_xml ();
/* Check for support. */
document = get_features_xml ("target.xml");
if (document == NULL)
{
own_buf[0] = '\0';
return;
}
/* Reject any annex other than target.xml; grab the offset and
length. */
if (decode_xfer_read (own_buf + 20, &annex, &ofs, &len) < 0
|| strcmp (annex, "target.xml") != 0)
/* Grab the annex, offset, and length. */
if (decode_xfer_read (own_buf + 20, &annex, &ofs, &len) < 0)
{
strcpy (own_buf, "E00");
return;
}
/* Now grab the correct annex. */
document = get_features_xml (annex);
if (document == NULL)
{
strcpy (own_buf, "E00");
return;
@ -352,7 +375,7 @@ handle_query (char *own_buf, int *new_packet_len_p)
if (the_target->read_auxv != NULL)
strcat (own_buf, ";qXfer:auxv:read+");
if (get_features_xml () != NULL)
if (get_features_xml ("target.xml") != NULL)
strcat (own_buf, ";qXfer:features:read+");
return;