Make find_separate_debug_file* return std::string
[deliverable/binutils-gdb.git] / gdb / build-id.c
index 57d98c96181f8ef3c6ad36fc0f4085ecce105eb9..a5d4e679716f563715c0e25cb401140b781470fc 100644 (file)
@@ -136,7 +136,7 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
 
 /* See build-id.h.  */
 
-char *
+std::string
 find_separate_debug_file_by_buildid (struct objfile *objfile)
 {
   const struct bfd_build_id *build_id;
@@ -157,7 +157,8 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
        warning (_("\"%s\": separate debug info file has no debug info"),
                 bfd_get_filename (abfd.get ()));
       else if (abfd != NULL)
-       return xstrdup (bfd_get_filename (abfd.get ()));
+       return std::string (bfd_get_filename (abfd.get ()));
     }
-  return NULL;
+
+  return std::string ();
 }
This page took 0.025319 seconds and 4 git commands to generate.