diff options
author | Tristan Gingold <gingold@adacore.com> | 2012-02-08 09:17:41 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2012-02-08 09:17:41 +0000 |
commit | 4b2d20a563f2320bb7aa14e35d20f89b19f07ff6 (patch) | |
tree | 41687d8e323d467e5d0567c3813d2a3b0188a1e1 /gdb/solib-darwin.c | |
parent | fc83b4801ea3d6579e307a8cc9f13bde2433a1cf (diff) | |
download | gdb-4b2d20a563f2320bb7aa14e35d20f89b19f07ff6.zip gdb-4b2d20a563f2320bb7aa14e35d20f89b19f07ff6.tar.gz gdb-4b2d20a563f2320bb7aa14e35d20f89b19f07ff6.tar.bz2 |
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.
Diffstat (limited to 'gdb/solib-darwin.c')
-rw-r--r-- | gdb/solib-darwin.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |