aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32c-tdep.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-11-19 18:31:49 +0000
committerPedro Alves <palves@redhat.com>2015-11-19 18:31:49 +0000
commitb35d5edb03798388d503d922d8f909a133bf93dd (patch)
tree8f0cee67bc183423c73ecd174bdc2b0a27f4e626 /gdb/m32c-tdep.c
parentbb82e93484cdd56c67efd52b869a6123b2623f6c (diff)
downloadbinutils-b35d5edb03798388d503d922d8f909a133bf93dd.zip
binutils-b35d5edb03798388d503d922d8f909a133bf93dd.tar.gz
binutils-b35d5edb03798388d503d922d8f909a133bf93dd.tar.bz2
gdb: Workaround bad gdbserver qSupported:xmlRegisters=i386;UnknwnFeat+ handling
gdbserver's target_process_qsupported is called for each feature that the gdbserver common code does not recognize. The only current implementation, for x86 Linux, does this: static void x86_linux_process_qsupported (const char *query) { /* Return if gdb doesn't support XML. If gdb sends "xmlRegisters=" with "i386" in qSupported query, it supports x86 XML target descriptions. */ use_xml = 0; if (query != NULL && startswith (query, "xmlRegisters=")) { char *copy = xstrdup (query + 13); char *p; for (p = strtok (copy, ","); p != NULL; p = strtok (NULL, ",")) { if (strcmp (p, "i386") == 0) { use_xml = 1; break; } } free (copy); } x86_linux_update_xmltarget (); } Notice that this clears use_xml and calls x86_linux_update_xmltarget each time target_process_qsupported is called. So if gdb sends in any unknown feature after "xmlRegisters=i386", like e.g., "xmlRegisters=i386;UnknownFeature+" gdbserver ends up not reporting a XML description... Work around this by having GDB send the "xmlRegisters=" feature last. gdb/ChangeLog: 2015-11-19 Pedro Alves <palves@redhat.com> * remote.c (remote_query_supported): Send the "xmlRegisters=" feature last.
Diffstat (limited to 'gdb/m32c-tdep.c')
0 files changed, 0 insertions, 0 deletions