From 0afae3cf2e83e8bc2dca4fe865afc85f0362d312 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 23 Mar 2012 20:27:08 +0000 Subject: 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. --- gdb/gdbserver/ChangeLog | 6 ++++++ gdb/gdbserver/linux-low.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'gdb') 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 + * 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 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, ""); + if (!header_done) + { + /* Empty list; terminate `"); + } + else + strcpy (p, ""); } document_len = strlen (document); -- cgit v1.1