binutils-gdb/gdb/compile
Tom Tromey 953cff5630 Change gcc_target_options to return std::string
This patch was inspired by a recent review that recommended using
std::string in a new implementation of the gcc_target_options gdbarch
function.  It changes this function to return std::string rather than
an ordinary xmalloc'd string.

I believe this caught a latent memory leak in compile.c:get_args.

Tested on x86-64 Fedora 29.

gdb/ChangeLog
2019-10-15  Tom Tromey  <tromey@adacore.com>

	* gdbarch.h, gdbarch.c: Rebuild.
	* gdbarch.sh (gcc_target_options): Change return type to
	std::string.
	* compile/compile.c (get_args): Update.
	* nios2-tdep.c (nios2_gcc_target_options): Return std::string.
	* arm-linux-tdep.c (arm_linux_gcc_target_options): Return
	std::string.
	* aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): Return
	std::string.
	* arch-utils.c (default_gcc_target_options): Return std::string.
	* arch-utils.h (default_gcc_target_options): Return std::string.
	* s390-tdep.c (s390_gcc_target_options): Return std::string.

Change-Id: I51f61703426a323089e646da8f22320a2cafbc1f
2019-10-15 11:03:57 -06:00
..
compile-c-support.c Move gdb-dlfcn.[ch] to gdbsupport/ 2019-08-23 13:13:18 -04:00
compile-c-symbols.c Rename gdb exception types 2019-04-08 09:05:40 -06:00
compile-c-types.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
compile-c.h Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
compile-cplus-symbols.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
compile-cplus-types.c Change boolean options to bool instead of int 2019-09-18 09:35:12 +09:00
compile-cplus.h Don't include gdbarch.h from defs.h 2019-07-10 14:53:53 -06:00
compile-internal.h Change boolean options to bool instead of int 2019-09-18 09:35:12 +09:00
compile-loc2c.c Don't include gdbarch.h from defs.h 2019-07-10 14:53:53 -06:00
compile-object-load.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
compile-object-load.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
compile-object-run.c Replace throw_exception with throw in some cases 2019-04-08 09:05:41 -06:00
compile-object-run.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
compile.c Change gcc_target_options to return std::string 2019-10-15 11:03:57 -06:00
compile.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
gcc-c-plugin.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
gcc-cp-plugin.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00