diff options
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; } |