From: Tristan Gingold Date: Wed, 8 Feb 2012 09:17:41 +0000 (+0000) Subject: 2012-02-08 Joel Brobecker X-Git-Tag: cygwin-1_7_11-release~153 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b2d20a563f2320bb7aa14e35d20f89b19f07ff6;p=external%2Fbinutils.git 2012-02-08 Joel Brobecker * solib-darwin.c (darwin_bfd_open): Make sure that the filename of the returned BFD is allocated by GDB. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 60c5833..1d49188 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-02-08 Joel Brobecker + + * solib-darwin.c (darwin_bfd_open): Make sure that the filename + of the returned BFD is allocated by GDB. + 2012-02-07 Tom Tromey PR python/12027: diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c index ddfd48b..95f8ad7 100644 --- a/gdb/solib-darwin.c +++ b/gdb/solib-darwin.c @@ -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; }