This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/8] put the psymtab filename in the filename bcache
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Tue, 26 Nov 2013 14:49:42 -0700
- Subject: [PATCH 3/8] put the psymtab filename in the filename bcache
- Authentication-results: sourceware.org; auth=none
- References: <1385502587-29757-1-git-send-email-tromey at redhat dot com>
This puts the psymtab filename in the filename bcache.
This saves a small amount of memory.
2013-11-26 Tom Tromey <tromey@redhat.com>
* 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/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.
--
1.8.1.4