summaryrefslogtreecommitdiff
path: root/gdb/build-id.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2018-03-08 18:56:23 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2018-03-08 18:56:23 -0500
commita8dbfd5853e3a5f7f2a3ca817e96d9e0759061a2 (patch)
tree6afc9df31bdc7097c42d1b0b8d0c994ba354e626 /gdb/build-id.h
parente6a58aa8a70c7fd17d9930e7df8d158a7e3c8c8e (diff)
downloadbinutils-gdb-a8dbfd5853e3a5f7f2a3ca817e96d9e0759061a2.tar.gz
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.
Diffstat (limited to 'gdb/build-id.h')
-rw-r--r--gdb/build-id.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/build-id.h b/gdb/build-id.h
index 0f13c7d4cf6..15fb6094097 100644
--- a/gdb/build-id.h
+++ b/gdb/build-id.h
@@ -41,10 +41,10 @@ extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len,
const bfd_byte *build_id);
/* Find the separate debug file for OBJFILE, by using the build-id
- associated with OBJFILE's BFD. If successful, returns a malloc'd
- file name for the separate debug file. The caller must free this.
- Otherwise, returns NULL. */
+ associated with OBJFILE's BFD. If successful, returns the file name for the
+ separate debug file, otherwise, return an empty string. */
-extern char *find_separate_debug_file_by_buildid (struct objfile *objfile);
+extern std::string find_separate_debug_file_by_buildid
+ (struct objfile *objfile);
#endif /* BUILD_ID_H */