> > Joel> We wouldn't be able to use a patch like this on the 7.6 branch, > > Joel> so for Darwin, I'd restore the xstrdup below - it would be a memory > > Joel> leak, but better to have a leak than not having the shared library name, > > Joel> IMO. > > > > You can make it not leak by using bfd_alloc. > > Neat! I will try that before I go. Here is the patch. gdb/ChangeLog: * solib-darwin.c (darwin_bfd_open): Set the filename of the returned bfd to a copy of PATHNAME. Tested on x86_64-darwin, no regression. Does it look OK for the branch? Thank you, -- Joel