diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index d141bac..d585afb 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,11 @@ 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 a variable whose type size is the same as the inferior's pointer size. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 2dc903d..71cde01 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, "</library-list-svr4>"); + if (!header_done) + { + /* Empty list; terminate `<library-list-svr4'. */ + strcpy (p, "/>"); + } + else + strcpy (p, "</library-list-svr4>"); } document_len = strlen (document); |