diff options
author | Tom Tromey <tromey@redhat.com> | 2013-11-25 07:55:23 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-12-06 12:13:42 -0700 |
commit | bf121224c754d7fd5d4f9a75ac33d6465977bdbb (patch) | |
tree | 031d3f23968ca71de0d40c518bf66eb29553fe95 /gdb | |
parent | 8e96694e31aedc28a4e2a00b28099158a8bd4a5a (diff) | |
download | gdb-bf121224c754d7fd5d4f9a75ac33d6465977bdbb.zip gdb-bf121224c754d7fd5d4f9a75ac33d6465977bdbb.tar.gz gdb-bf121224c754d7fd5d4f9a75ac33d6465977bdbb.tar.bz2 |
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 <tromey@redhat.com>
* psymtab.c (allocate_psymtab): Put the filename in the filename
bcache.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/psymtab.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9cec9c3..38ba081 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-12-06 Tom Tromey <tromey@redhat.com> + * psymtab.c (allocate_psymtab): Put the filename in the filename + bcache. + +2013-12-06 Tom Tromey <tromey@redhat.com> + * buildsym.c (end_symtab_from_static_block): Use obstack_copy0. * symtab.h (struct symtab) <dirname>: Now const. diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 8eac5e1..1d33662 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. |