put the psymtab filename in the filename bcache
authorTom Tromey <tromey@redhat.com>
Mon, 25 Nov 2013 14:55:23 +0000 (07:55 -0700)
committerTom Tromey <tromey@redhat.com>
Fri, 6 Dec 2013 19:13:42 +0000 (12:13 -0700)
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.

gdb/ChangeLog
gdb/psymtab.c

index 9cec9c33b2fece8a491919ce34c3ba4545879911..38ba081a7e28b6fa005856933a1eb36fb75a1625 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 8eac5e134fd4491de77e290d6d60953325127518..1d336623941d08c361a70e737119c830e19bd7b4 100644 (file)
@@ -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.
This page took 0.051357 seconds and 4 git commands to generate.