From 5e1875543df7413d3cbc3831390445e347064b75 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 16 Sep 2017 14:19:31 +0200 Subject: Make xml_escape_text return an std::string This is a simple replacement, it allows removing some manual free'ing in the callers. gdb/ChangeLog: * common/buffer.c (buffer_xml_printf): Adjust. * common/xml-utils.c (xml_escape_text): Change return type to std::string, update code accordingly. * common/xml-utils.h (xml_escape_text): Change return type to std::string. * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust. * windows-tdep.c (windows_xfer_shared_library): Adjust. * unittests/xml-utils-selftests.c (test_xml_escape_text): Adjust. gdb/gdbserver/ChangeLog: * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of return type of xml_escape_text. * server.c (emit_dll_description): Likewise. --- gdb/common/xml-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/common/xml-utils.h') diff --git a/gdb/common/xml-utils.h b/gdb/common/xml-utils.h index d138bab..f69f5f5 100644 --- a/gdb/common/xml-utils.h +++ b/gdb/common/xml-utils.h @@ -23,6 +23,6 @@ /* Return a malloc allocated string with special characters from TEXT replaced by entity references. */ -extern char *xml_escape_text (const char *text); +extern std::string xml_escape_text (const char *text); #endif -- cgit v1.1