2012-03-23 Pedro Alves <palves@redhat.com>
authorPedro Alves <palves@redhat.com>
Fri, 23 Mar 2012 20:27:08 +0000 (20:27 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 23 Mar 2012 20:27:08 +0000 (20:27 +0000)
* linux-low.c (linux_qxfer_libraries_svr4): Terminate the
"library-list-svr4" element's start tag when the the DSO list is
empty.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c

index d141bac70eb9bb23ce02c9f6226d67e14412e819..d585afbf44376636d965a0913ce5b73560575810 100644 (file)
@@ -1,3 +1,9 @@
+2012-03-23  Pedro Alves  <palves@redhat.com>
+
+       * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
+       "library-list-svr4" element's start tag when the the DSO list is
+       empty.
+
 2012-03-23  Pedro Alves  <palves@redhat.com>
 
        * linux-low.c (read_one_ptr): Read the inferior's pointer through
index 2dc903dd12221acf4dab822a0fd368fea4b1e0b0..71cde01d43a03abf6b35bde968d5c860dce4c9b9 100644 (file)
@@ -5630,7 +5630,13 @@ linux_qxfer_libraries_svr4 (const char *annex, unsigned char *readbuf,
          lm_addr = l_next;
        }
     done:
-      strcpy (p, "</library-list-svr4>");
+      if (!header_done)
+       {
+         /* Empty list; terminate `<library-list-svr4'.  */
+         strcpy (p, "/>");
+       }
+      else
+       strcpy (p, "</library-list-svr4>");
     }
 
   document_len = strlen (document);
This page took 0.032528 seconds and 4 git commands to generate.