From 24c05f46059182f0c8768c6ebbb66b4ca3233ecc Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Wed, 10 Jun 2015 18:29:05 +0200 Subject: Fix gdbserver and its #FIXED version="1.0" While reimplementing I found from expat-2.0.1-11.fc15.x86_64: warning: while parsing target library list (at line 1): Required attribute "version" of not specified I believe the same bug has to apply for existing FSF gdbserver but I do not have any platform to test it (I did not try to build MinGW). features/library-list.dtd: http://www.xml.com/pub/a/98/10/guide0.html?page=3 says: In this case, the attribute is not required, but if it occurs, it must have the specified value. Which would suggest gdbserver is right but solib-target.c is wrong. One could also make gdbserver explicit for the version (if those 14 bytes are not of a concern). gdb/ChangeLog 2015-06-10 Jan Kratochvil * solib-target.c (library_list_start_list): Do not dereference variable version in its initialization. Make the VERSION check handle NULL. (library_list_attributes): Make "version" GDB_XML_AF_OPTIONAL. gdb/gdbserver/ChangeLog 2015-06-10 Jan Kratochvil * server.c (handle_qxfer_libraries): Set `version' attribute for . --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/server.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gdb/gdbserver') diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 5c3e44f..5d5f0a4 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2015-06-10 Jan Kratochvil + + * server.c (handle_qxfer_libraries): Set `version' attribute for + . + 2015-06-10 Gary Benson * target.h (struct target_ops) : New field. diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 70fbefb..01b9c96 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -1291,7 +1291,7 @@ handle_qxfer_libraries (const char *annex, if (document == NULL) return -1; - strcpy (document, "\n"); + strcpy (document, "\n"); p = document + strlen (document); for_each_inferior_with_data (&all_dlls, emit_dll_description, &p); -- cgit v1.1