mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 10:09:16 +08:00
Remove gdb_bfd_stash_filename to fix crash with fix of binutils/11983
https://sourceware.org/ml/gdb-patches/2014-01/msg00029.html https://sourceware.org/ml/gdb-patches/2014-01/msg00053.html 2014-01-07 Hui Zhu <hui@codesourcery.com> * gdb_bfd.c (gdb_bfd_stash_filename): Removed. (gdb_bfd_open): Removed gdb_bfd_stash_filename. (gdb_bfd_fopen): Ditto. (gdb_bfd_openr): Ditto. (gdb_bfd_openw): Ditto. (gdb_bfd_openr_iovec): Ditto. (gdb_bfd_fdopenr): Ditto. * gdb_bfd.h (gdb_bfd_stash_filename): Removed. * solib-aix.c (solib_aix_bfd_open): Alloc object_bfd->filename with xstrdup. * solib-darwin.c (darwin_bfd_open): Alloc res->filename with xstrdup. * symfile-mem.c (symbol_file_add_from_memory): Removed gdb_bfd_stash_filename.
This commit is contained in:
@ -621,12 +621,8 @@ darwin_bfd_open (char *pathname)
|
||||
/* The current filename for fat-binary BFDs is a name generated
|
||||
by BFD, usually a string containing the name of the architecture.
|
||||
Reset its value to the actual filename. */
|
||||
{
|
||||
char *data = bfd_alloc (res, strlen (pathname) + 1);
|
||||
|
||||
strcpy (data, pathname);
|
||||
res->filename = data;
|
||||
}
|
||||
xfree (bfd_get_filename (res));
|
||||
res->filename = xstrdup (pathname);
|
||||
|
||||
gdb_bfd_unref (abfd);
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user