diff options
author | Tom Tromey <tromey@redhat.com> | 2011-12-21 21:30:31 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-12-21 21:30:31 +0000 |
commit | 0af1e9a54ba5bef7cbeeb0c65a311be8e0cfdd9d (patch) | |
tree | fae85abc69b31299903ac2a65bb39dc4bf0ae0a2 /gdb/elfread.c | |
parent | 04aba06513c46875cc5cc8dd5c3280a34a4ad3c5 (diff) | |
download | gdb-0af1e9a54ba5bef7cbeeb0c65a311be8e0cfdd9d.zip gdb-0af1e9a54ba5bef7cbeeb0c65a311be8e0cfdd9d.tar.gz gdb-0af1e9a54ba5bef7cbeeb0c65a311be8e0cfdd9d.tar.bz2 |
* elfread.c (elf_symtab_read): Put the filename in the filename
bcache.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r-- | gdb/elfread.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c index fd65ecf..4ceb31b 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -43,6 +43,7 @@ #include "infcall.h" #include "gdbthread.h" #include "regcache.h" +#include "bcache.h" extern void _initialize_elfread (void); @@ -240,8 +241,8 @@ elf_symtab_read (struct objfile *objfile, int type, seen any section info for it yet. */ asymbol *filesym = 0; /* Name of filesym. This is either a constant string or is saved on - the objfile's obstack. */ - char *filesymname = ""; + the objfile's filename cache. */ + const char *filesymname = ""; struct dbx_symfile_info *dbx = objfile->deprecated_sym_stab_info; int stripped = (bfd_get_symcount (objfile->obfd) == 0); @@ -346,9 +347,8 @@ elf_symtab_read (struct objfile *objfile, int type, sectinfo = NULL; } filesym = sym; - filesymname = - obsavestring ((char *) filesym->name, strlen (filesym->name), - &objfile->objfile_obstack); + filesymname = bcache (filesym->name, strlen (filesym->name) + 1, + objfile->filename_cache); } else if (sym->flags & BSF_SECTION_SYM) continue; |