diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-02-08 21:39:04 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-02-08 21:39:04 +0000 |
commit | fb1e4ffce36db7b63b85bc3a64917bda0c8ac84b (patch) | |
tree | fa96d864ea40641c4172c0b4becebddf54f02806 /gdb/gdbserver/server.c | |
parent | f3cd89f49b5b3ac6dbf0b462e8643bc5d22aa04e (diff) | |
download | fsf-binutils-gdb-fb1e4ffce36db7b63b85bc3a64917bda0c8ac84b.zip fsf-binutils-gdb-fb1e4ffce36db7b63b85bc3a64917bda0c8ac84b.tar.gz fsf-binutils-gdb-fb1e4ffce36db7b63b85bc3a64917bda0c8ac84b.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/gdbserver/server.c')
-rw-r--r-- | gdb/gdbserver/server.c | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 20d47c9..db2bfca 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -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; |