From bf121224c754d7fd5d4f9a75ac33d6465977bdbb Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 25 Nov 2013 07:55:23 -0700 Subject: [PATCH] put the psymtab filename in the filename bcache This puts the psymtab filename in the filename bcache. This saves a small amount of memory. 2013-12-06 Tom Tromey * psymtab.c (allocate_psymtab): Put the filename in the filename bcache. --- gdb/ChangeLog | 5 +++++ gdb/psymtab.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9cec9c33b2f..38ba081a7e2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-12-06 Tom Tromey + + * psymtab.c (allocate_psymtab): Put the filename in the filename + bcache. + 2013-12-06 Tom Tromey * buildsym.c (end_symtab_from_static_block): Use obstack_copy0. diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 8eac5e134fd..1d336623941 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -1742,8 +1742,8 @@ allocate_psymtab (const char *filename, struct objfile *objfile) sizeof (struct partial_symtab)); memset (psymtab, 0, sizeof (struct partial_symtab)); - psymtab->filename = obstack_copy0 (&objfile->objfile_obstack, - filename, strlen (filename)); + psymtab->filename = bcache (filename, strlen (filename) + 1, + objfile->per_bfd->filename_cache); psymtab->symtab = NULL; /* Prepend it to the psymtab list for the objfile it belongs to.