2012-02-08 Joel Brobecker <brobecker@adacore.com>

* solib-darwin.c (darwin_bfd_open): Make sure that the filename
	of the returned BFD is allocated by GDB.
This commit is contained in:
Tristan Gingold 2012-02-08 09:17:41 +00:00
parent fc83b4801e
commit 4b2d20a563
2 changed files with 11 additions and 0 deletions

View file

@ -456,6 +456,12 @@ darwin_bfd_open (char *pathname)
error (_("`%s': not a shared-library: %s"),
found_pathname, bfd_errmsg (bfd_get_error ()));
}
/* Make sure that the filename is malloc'ed. The current filename
for fat-binaries BFDs is a name that was generated by BFD, usually
a static string containing the name of the architecture. */
res->filename = xstrdup (pathname);
return res;
}