aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-spu.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-07-18 19:34:57 +0000
committerTom Tromey <tromey@redhat.com>2012-07-18 19:34:57 +0000
commita4453b7e0b9b84dd18c844ef43fbb9f6e2e75433 (patch)
tree86d872256f3fb47092c6660448c7f7655748e2b7 /gdb/solib-spu.c
parentcbb099e88685f8aa80b9a958ba35988d8dbb8721 (diff)
downloadgdb-a4453b7e0b9b84dd18c844ef43fbb9f6e2e75433.zip
gdb-a4453b7e0b9b84dd18c844ef43fbb9f6e2e75433.tar.gz
gdb-a4453b7e0b9b84dd18c844ef43fbb9f6e2e75433.tar.bz2
* symfile.c (symfile_bfd_open): Don't copy name. Call
gdb_bfd_stash_filename. (load_command): Open the new BFD before freeing the old. (bfd_open_maybe_remote): Call gdb_bfd_stash_filename. * symfile-mem.c (symbol_file_add_from_memory): Don't copy name. Call gdb_bfd_stash_filename. * spu-linux-nat.c (spu_bfd_open): Don't copy name. * solib-spu.c (spu_bfd_fopen): Don't copy name. Call gdb_bfd_stash_filename. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Free found_pathname. * rs6000-nat.c (add_vmap): Don't copy filename. Call gdb_bfd_stash_filename. * remote.c (remote_bfd_open): Call gdb_bfd_stash_filename. * machoread.c (macho_add_oso_symfile): Call gdb_bfd_stash_filename. (macho_symfile_read_all_oso): Arrange to free archive_name. Call gdb_bfd_stash_filename. (macho_check_dsym): Don't copy filename. Call gdb_bfd_stash_filename. * jit.c (bfd_open_from_target_memory): Don't copy the filename. * gdb_bfd.c (gdb_bfd_stash_filename): New function. * gdb_bfd.h (gdb_bfd_stash_filename): Declare. * gcore.c (create_gcore_bfd): Call gdb_bfd_stash_filename. * exec.c (exec_close): Don't free the BFD's filename. (exec_file_attach): Don't copy the filename. Call gdb_bfd_stash_filename. * corelow.c (core_close): Don't free the BFD's filename. (core_open): Call gdb_bfd_stash_filename. * corefile.c (reopen_exec_file): Remove #if 0 code. * solib.c (solib_bfd_fopen): Call gdb_bfd_stash_filename. Free pathname. * dwarf2read.c (try_open_dwo_file): Call gdb_bfd_stash_filename.
Diffstat (limited to 'gdb/solib-spu.c')
-rw-r--r--gdb/solib-spu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index 5f03a42..5eeae62 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -326,7 +326,7 @@ spu_bfd_fopen (char *name, CORE_ADDR addr)
CORE_ADDR *open_closure = xmalloc (sizeof (CORE_ADDR));
*open_closure = addr;
- nbfd = gdb_bfd_ref (bfd_openr_iovec (xstrdup (name), "elf32-spu",
+ nbfd = gdb_bfd_ref (bfd_openr_iovec (name, "elf32-spu",
spu_bfd_iovec_open, open_closure,
spu_bfd_iovec_pread, spu_bfd_iovec_close,
spu_bfd_iovec_stat));
@@ -339,6 +339,7 @@ spu_bfd_fopen (char *name, CORE_ADDR addr)
return NULL;
}
+ gdb_bfd_stash_filename (nbfd);
return nbfd;
}