* amd64-sol2-tdep.c (amd64_sol2_gregset_reg_offset): Correct
[deliverable/binutils-gdb.git] / gdb / solib-darwin.c
index d592809cbf862d58eaa76e9f126d21a65ed2755d..95f8ad7962d8a814680bab164332bc9bfd72750a 100644 (file)
@@ -1,6 +1,6 @@
 /* Handle Darwin shared libraries for GDB, the GNU Debugger.
 
-   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -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;
 }
 
This page took 0.023789 seconds and 4 git commands to generate.