aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-10 16:23:53 -0600
committerTom Tromey <tom@tromey.com>2019-01-10 07:08:13 -0700
commit5923a04c0c489054d275e3b0441626ce1ae7344a (patch)
treeb295769dbfebc8aa112b435e6075067764ad54d3 /gdb/psymtab.c
parent6d6a12bf87bc6dd89b2533b5d0490fdcc00df9ad (diff)
downloadgdb-5923a04c0c489054d275e3b0441626ce1ae7344a.zip
gdb-5923a04c0c489054d275e3b0441626ce1ae7344a.tar.gz
gdb-5923a04c0c489054d275e3b0441626ce1ae7344a.tar.bz2
Allocate the address map on the psymtab obstack
After this patch, the psymtab address map will now be allocated on the psymtab obstack rather than the objfile obstack. This also changes the psymtab storage object to make the obstack private; this will be used later. gdb/ChangeLog 2019-01-10 Tom Tromey <tom@tromey.com> * psymtab.h (psymtab_storage::obstack): New method. <m_obstack>: Rename from obstack; now private. * psymtab.c (psymtab_storage): Update. * dwarf2read.c (create_addrmap_from_index) (create_addrmap_from_aranges, dwarf2_build_psymtabs_hard): Update.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 7af82d6..e185441 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -68,8 +68,8 @@ static struct compunit_symtab *psymtab_to_symtab (struct objfile *objfile,
psymtab_storage::psymtab_storage (struct objfile *objfile)
- : obstack (&objfile->objfile_obstack),
- psymbol_cache (psymbol_bcache_init ())
+ : psymbol_cache (psymbol_bcache_init ()),
+ m_obstack (&objfile->objfile_obstack)
{
}