Make find_separate_debug_file* return std::string

This patch makes the find_separate_debug_file* functions return
std::string, which allows to get rid of some manual memory management
and one cleanup.

gdb/ChangeLog:

	* build-id.c (find_separate_debug_file_by_buildid): Return
	std::string.
	* build-id.h (find_separate_debug_file_by_buildid): Return
	std::string.
	* coffread.c (coff_symfile_read): Adjust to std::string.
	* elfread.c (elf_symfile_read): Adjust to std::string.
	* symfile.c (separate_debug_file_exists): Change parameter to
	std::string.
	(find_separate_debug_file): Return std::string.
	(find_separate_debug_file_by_debuglink): Return std::string.
	* symfile.h (find_separate_debug_file_by_debuglink): Return
	std::string.
This commit is contained in:
Simon Marchi
2018-03-08 18:56:23 -05:00
committed by Simon Marchi
parent e6a58aa8a7
commit a8dbfd5853
7 changed files with 66 additions and 70 deletions

View File

@@ -426,7 +426,7 @@ extern struct objfile *symbol_file_add_from_bfd (bfd *, const char *, symfile_ad
extern void symbol_file_add_separate (bfd *, const char *, symfile_add_flags,
struct objfile *);
extern char *find_separate_debug_file_by_debuglink (struct objfile *);
extern std::string find_separate_debug_file_by_debuglink (struct objfile *);
/* Create a new section_addr_info, with room for NUM_SECTIONS. */