mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +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:
@ -24,12 +24,6 @@
|
||||
|
||||
DECLARE_REGISTRY (bfd);
|
||||
|
||||
/* Make a copy ABFD's filename using bfd_alloc, and reassign it to the
|
||||
BFD. This ensures that the BFD's filename has the same lifetime as
|
||||
the BFD itself. */
|
||||
|
||||
void gdb_bfd_stash_filename (struct bfd *abfd);
|
||||
|
||||
/* Open a read-only (FOPEN_RB) BFD given arguments like bfd_fopen.
|
||||
Returns NULL on error. On success, returns a new reference to the
|
||||
BFD, which must be freed with gdb_bfd_unref. BFDs returned by this
|
||||
@ -79,22 +73,22 @@ int gdb_bfd_crc (struct bfd *abfd, unsigned long *crc_out);
|
||||
|
||||
|
||||
/* A wrapper for bfd_fopen that initializes the gdb-specific reference
|
||||
count and calls gdb_bfd_stash_filename. */
|
||||
count. */
|
||||
|
||||
bfd *gdb_bfd_fopen (const char *, const char *, const char *, int);
|
||||
|
||||
/* A wrapper for bfd_openr that initializes the gdb-specific reference
|
||||
count and calls gdb_bfd_stash_filename. */
|
||||
count. */
|
||||
|
||||
bfd *gdb_bfd_openr (const char *, const char *);
|
||||
|
||||
/* A wrapper for bfd_openw that initializes the gdb-specific reference
|
||||
count and calls gdb_bfd_stash_filename. */
|
||||
count. */
|
||||
|
||||
bfd *gdb_bfd_openw (const char *, const char *);
|
||||
|
||||
/* A wrapper for bfd_openr_iovec that initializes the gdb-specific
|
||||
reference count and calls gdb_bfd_stash_filename. */
|
||||
reference count. */
|
||||
|
||||
bfd *gdb_bfd_openr_iovec (const char *filename, const char *target,
|
||||
void *(*open_func) (struct bfd *nbfd,
|
||||
@ -112,12 +106,12 @@ bfd *gdb_bfd_openr_iovec (const char *filename, const char *target,
|
||||
struct stat *sb));
|
||||
|
||||
/* A wrapper for bfd_openr_next_archived_file that initializes the
|
||||
gdb-specific reference count and calls gdb_bfd_stash_filename. */
|
||||
gdb-specific reference count. */
|
||||
|
||||
bfd *gdb_bfd_openr_next_archived_file (bfd *archive, bfd *previous);
|
||||
|
||||
/* A wrapper for bfd_fdopenr that initializes the gdb-specific
|
||||
reference count and calls gdb_bfd_stash_filename. */
|
||||
reference count. */
|
||||
|
||||
bfd *gdb_bfd_fdopenr (const char *filename, const char *target, int fd);
|
||||
|
||||
|
Reference in New Issue
Block a user