diff options
Diffstat (limited to 'gdb/symfile-mem.c')
-rw-r--r-- | gdb/symfile-mem.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index 1c306fa..0470d97 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -103,9 +103,13 @@ symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, char *name, gdb_bfd_ref (nbfd); if (name == NULL) - nbfd->filename = xstrdup ("shared object read from target memory"); + nbfd->filename = "shared object read from target memory"; else - nbfd->filename = name; + { + nbfd->filename = name; + gdb_bfd_stash_filename (nbfd); + xfree (name); + } if (!bfd_check_format (nbfd, bfd_object)) { |