Re: [PATCH v2 3/3] Make relocate_{path,gdb_directory} return std::string

Tom Tromey
2019-09-11T20:24:27Z

>>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:

Christian> This simplifies memory management. I've also changed some global variables
Christian> to std::string accordingly (which store the result of these functions),
Christian> but not all because some are used with add_setshow_optional_filename_cmd
Christian> which requires a char*.

Christian> gdb/ChangeLog:

Christian> 2019-09-09 Christian Biesinger <cbiesinger@google.com>

Christian> * auto-load.c (auto_load_expand_dir_vars): Update.
Christian> * defs.h (gdb_datadir): Change to std::string.
Christian> (python_libdir): Likewise.
Christian> (relocate_gdb_directory): Change return type to std::string.
Christian> * guile/guile.c (gdbscm_data_directory): Update.
Christian> (initialize_scheme_side): Update.
Christian> * jit.c (jit_reader_dir): Change to std::string.
Christian> (jit_reader_load_command): Update.
Christian> * main.c (gdb_datadir): Change to std::string.
Christian> (python_libdir): Likewise.
Christian> (set_gdb_data_directory): Update.
Christian> (relocate_path): Change to return std::string.
Christian> (relocate_gdb_directory): Change to return std::string.
Christian> (relocate_gdbinit_path_maybe_in_datadir): Update.
Christian> (captured_main_1): Update.
Christian> * python/python.c (do_start_initialization): Update.
Christian> * top.c (show_gdb_datadir): Update.
Christian> * xml-syscall.c (xml_init_syscalls_info): Update.
Christian> (init_syscalls_info): Update.

Thanks, this is ok.

Tom