From: Pedro Alves Date: Fri, 23 Mar 2012 20:27:08 +0000 (+0000) Subject: 2012-03-23 Pedro Alves X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0afae3cf2e83e8bc2dca4fe865afc85f0362d312;p=binutils-gdb.git 2012-03-23 Pedro Alves * linux-low.c (linux_qxfer_libraries_svr4): Terminate the "library-list-svr4" element's start tag when the the DSO list is empty. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index d141bac70eb..d585afbf443 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2012-03-23 Pedro Alves + + * 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 * linux-low.c (read_one_ptr): Read the inferior's pointer through diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 2dc903dd122..71cde01d43a 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -5630,7 +5630,13 @@ linux_qxfer_libraries_svr4 (const char *annex, unsigned char *readbuf, lm_addr = l_next; } done: - strcpy (p, ""); + if (!header_done) + { + /* Empty list; terminate `"); + } + else + strcpy (p, ""); } document_len = strlen (document);