From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH v2 09/12] Move more allocations to psymtab obstack
Date: Sun, 25 Nov 2018 19:20:00 -0000 [thread overview]
Message-ID: <20181125192043.8405-10-tom@tromey.com> (raw)
In-Reply-To: <20181125192043.8405-1-tom@tromey.com>
This moves a couple more psymtab-related allocations to the psymtab
obstack.
gdb/ChangeLog
2018-11-25 Tom Tromey <tom@tromey.com>
* psymtab.c (add_psymbol_to_bcache): Pass psymtab obstack to
PSYMBOL_SET_LANGUAGE.
(allocate_psymtab): Allocate psymtab on the psymtab obstack.
---
gdb/ChangeLog | 6 ++++++
gdb/psymtab.c | 5 +++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index d4152bdba4..bd957e7b62 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1680,7 +1680,8 @@ add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
memset (&psymbol.language_specific, 0, sizeof (psymbol.language_specific));
psymbol.ada_mangled = 0;
- symbol_set_language (&psymbol, language, &objfile->objfile_obstack);
+ symbol_set_language (&psymbol, language,
+ objfile->partial_symtabs->obstack ());
symbol_set_names (&psymbol, name, namelength, copy_name, objfile->per_bfd);
/* Stash the partial symbol away in the cache. */
@@ -1765,7 +1766,7 @@ allocate_psymtab (const char *filename, struct objfile *objfile)
objfile->partial_symtabs->free_psymtabs = psymtab->next;
}
else
- psymtab = XOBNEW (&objfile->objfile_obstack, partial_symtab);
+ psymtab = XOBNEW (objfile->partial_symtabs->obstack (), partial_symtab);
memset (psymtab, 0, sizeof (struct partial_symtab));
psymtab->filename
--
2.17.2
next prev parent reply other threads:[~2018-11-25 19:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-25 19:20 [PATCH v2 00/12] Work toward making psymtabs reusable Tom Tromey
2018-11-25 19:20 ` [PATCH v2 05/12] Change symbol_set_names to take an objfile_per_bfd_storage Tom Tromey
2018-11-25 19:20 ` [PATCH v2 02/12] Change add_psymbol_to_list to use an enum Tom Tromey
2018-11-25 19:20 ` [PATCH v2 03/12] Simplify calls to init_psymbol_list Tom Tromey
2018-11-25 19:20 ` [PATCH v2 01/12] Remove parameters from start_psymtab_common Tom Tromey
2018-11-25 19:20 ` [PATCH v2 12/12] Move psymtabs to their own obstack Tom Tromey
2018-11-25 19:20 ` [PATCH v2 04/12] Change create_demangled_names_hash to take an objfile_per_bfd_storage Tom Tromey
2018-11-25 19:20 ` Tom Tromey [this message]
2018-11-25 19:20 ` [PATCH v2 11/12] Make psymtab_storage::free_psymtabs private Tom Tromey
2018-11-25 19:20 ` [PATCH v2 08/12] Allocate the address map on the psymtab obstack Tom Tromey
2018-11-25 19:20 ` [PATCH v2 07/12] Introduce objfile::reset_psymtabs Tom Tromey
2018-11-25 19:20 ` [PATCH v2 10/12] Add psymtab_storage::allocate_dependencies Tom Tromey
2018-11-25 19:22 ` [PATCH v2 06/12] Introduce class psymtab_storage Tom Tromey
2019-01-10 14:09 ` [PATCH v2 00/12] Work toward making psymtabs reusable Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181125192043.8405-10-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).