binutils-gdb/gdb/common
Simon Marchi e6a58aa8a7 Add xml_escape_text_append and use it
[This patch should go on top of "linux_qxfer_libraries_svr4: Use
 std::string", I should have sent them together as a series.]

I noticed that linux_qxfer_libraries_svr4 used xml_escape_text, which
returns an std::string.  That string is then copied into a larger
buffer.  It would be more efficient if we had a version of
xml_escape_text which appended to an existing string instead of
returning a new one.  This is what this patch does.

I manually verified that the output of linux_qxfer_libraries_svr4 didn't
change before/after the patch.

gdb/ChangeLog:

	* common/xml-utils.c (xml_escape_text): Move code to...
	(xml_escape_text_append): ... this new function.
	* common/xml-utils.h (xml_escape_text_append): New declaration.
	* unittests/xml-utils-selftests.c (test_xml_escape_text_append):
	New function.
	(_initialize_xml_utils): register test_xml_escape_text_append as
	a selftest.

gdb/gdbserver/ChangeLog:

	* linux-low.c (linux_qxfer_libraries_svr4): Use
	xml_escape_text_append.
2018-03-08 18:04:46 -05:00
..
agent.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
agent.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
array-view.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ax.def Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
break-common.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
btrace-common.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
btrace-common.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
buffer.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
buffer.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
byte-vector.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
cleanups.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
cleanups.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-debug.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-debug.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-defs.h Create new common/pathstuff.[ch] 2018-02-28 11:34:39 -05:00
common-exceptions.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-exceptions.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-gdbthread.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-inferior.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-regcache.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-regcache.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-types.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-utils.c Make gdbserver work with filename-only binaries 2018-02-28 11:37:10 -05:00
common-utils.h Make gdbserver work with filename-only binaries 2018-02-28 11:37:10 -05:00
common.host Add common/ dir in build directories 2018-02-19 09:37:24 +00:00
common.m4 Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
create-version.sh Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
def-vector.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
default-init-alloc.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
diagnostics.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
enum-flags.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
environ.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
environ.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
errors.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
errors.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
fileio.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
fileio.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
filestuff.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
filestuff.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
format.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
format.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
function-view.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_assert.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_locale.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_optional.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_ref_ptr.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_setjmp.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_signals.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_splay_tree.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_sys_time.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_tilde_expand.c Create new common/pathstuff.[ch] 2018-02-28 11:34:39 -05:00
gdb_tilde_expand.h Create new common/pathstuff.[ch] 2018-02-28 11:34:39 -05:00
gdb_unique_ptr.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_unlinker.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_vecs.c Remove free_char_ptr_vec 2018-03-02 23:22:10 -05:00
gdb_vecs.h btrace: Remove VEC cleanups 2018-03-06 09:51:33 -05:00
gdb_wait.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
hash_enum.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
host-defs.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
job-control.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
job-control.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mingw-strerror.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
new-op.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
offset-type.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
pathstuff.c Conditionally include "<windows.h>" on common/pathstuff.c (and unbreak build on mingw*) 2018-03-02 07:32:31 -05:00
pathstuff.h Make gdbserver work with filename-only binaries 2018-02-28 11:37:10 -05:00
poison.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
posix-strerror.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
preprocessor.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
print-utils.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
print-utils.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ptid.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ptid.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
queue.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
refcounted-object.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
rsp-low.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
rsp-low.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
run-time-clock.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
run-time-clock.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
scoped_fd.h common: add scoped_fd 2018-02-09 14:03:18 +01:00
scoped_mmap.h common: add scoped_mmap 2018-02-09 14:03:19 +01:00
scoped_restore.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
selftest.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
selftest.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
signals-state-save-restore.c gdb/common/signals-state-save-restore.c: Fix typos 2018-01-15 20:03:20 +00:00
signals-state-save-restore.h Fix regression: cannot start with LD_PRELOAD=libSegFault.so (PR gdb/18653#c7) 2018-01-05 18:26:18 +00:00
signals.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
symbol.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tdesc.h Move arch/tdesc.h to common/tdesc.h 2018-02-26 11:46:57 +00:00
traits.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
underlying.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
valid-expr.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
vec.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
vec.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
version.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
x86-xstate.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
xml-utils.c Add xml_escape_text_append and use it 2018-03-08 18:04:46 -05:00
xml-utils.h Add xml_escape_text_append and use it 2018-03-08 18:04:46 -05:00