binutils-gdb/gdb/cli
Pedro Alves b02f78f928 Introduce and use make_unique_xstrdup
Adds an utility function to make it shorter to write the common case
of wrapping an xstrdup with a unique_xmalloc_ptr, and uses it
throughout.

Note: I tried to put this in common/common-utils.h near skip_spaces,
etc. but that is included in common/common-defs.h before
common/gdb_unique_ptr.h is included, so it would fail to compile
because gdb::unique_xmalloc_ptr isn't defined at that point yet.  I
tried moving the gdb_unique_ptr.h inclusion before common-utils.h, but
that doesn't work because gdb_unique_ptr.h depends on common-utils.h
for xfree.

gdb/ChangeLog:
2019-06-04  Pedro Alves  <palves@redhat.com>

	* common/gdb_unique_ptr.h (make_unique_xstrdup): New.

	* ada-lang.c (catch_ada_completer): Use make_unique_xstrdup.
	* breakpoint.c (condition_completer): Likewise.
	* cli/cli-dump.c (scan_expression): Likewise.
	* common/filestuff.c (mkdir_recursive): Likewise.
	* common/gdb_tilde_expand.c (gdb_tilde_expand_up)
	* common/pathstuff.c (gdb_realpath, gdb_realpath_keepfile)
	(gdb_abspath): Likewise.
	* compile/compile-cplus-types.c
	(compile_cplus_instance::decl_name): Likewise.
	* completer.c (complete_explicit_location):
	(signal_completer, reg_or_group_completer_1): Likewise.
	* cp-support.c (cp_remove_params_if_any): Likewise.
	* fbsd-tdep.c (fbsd_core_vnode_path): Likewise.
	* guile/scm-safe-call.c (gdbscm_safe_eval_string): Likewise.
	* infcmd.c (strip_bg_char): Likewise.
	* linespec.c (copy_token_string): Likewise.
	* mi/mi-main.c (output_cores): Likewise.
	* psymtab.c (psymtab_search_name):
	* symfile.c (test_set_ext_lang_command): Likewise.
	* target.c (target_fileio_read_stralloc): Likewise.
	* tui/tui-regs.c (tui_reggroup_completer): Likewise.
	* value.c (complete_internalvar): Likewise.

gdb/gdbserver/ChangeLog:
2019-06-04  Pedro Alves  <palves@redhat.com>

	* server.c (captured_main): Use make_unique_xstrdup.
2019-06-04 22:48:32 +01:00
..
cli-cmds.c Improve usability and/or readibility of help and apropos output. 2019-06-03 21:59:18 +02:00
cli-cmds.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
cli-decode.c Improve usability and/or readibility of help and apropos output. 2019-06-03 21:59:18 +02:00
cli-decode.h Improve usability and/or readibility of help and apropos output. 2019-06-03 21:59:18 +02:00
cli-dump.c Introduce and use make_unique_xstrdup 2019-06-04 22:48:32 +01:00
cli-interp.c Add debug redirect option 2019-05-17 14:21:47 +01:00
cli-interp.h Add debug redirect option 2019-05-17 14:21:47 +01:00
cli-logging.c Add debug redirect option 2019-05-17 14:21:47 +01:00
cli-script.c Replace throw_exception with throw in some cases 2019-04-08 09:05:41 -06:00
cli-script.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
cli-setshow.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
cli-setshow.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
cli-style.c Add highlight style, title style, fputs_highlighted. Improve 'show style' 2019-06-03 21:59:11 +02:00
cli-style.h Add highlight style, title style, fputs_highlighted. Improve 'show style' 2019-06-03 21:59:11 +02:00
cli-utils.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
cli-utils.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00