diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-10 16:23:53 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-01-10 07:08:13 -0700 |
commit | 5923a04c0c489054d275e3b0441626ce1ae7344a (patch) | |
tree | b295769dbfebc8aa112b435e6075067764ad54d3 /gdb/dwarf2read.c | |
parent | 6d6a12bf87bc6dd89b2533b5d0490fdcc00df9ad (diff) | |
download | gdb-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/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index a0365f5..97ca341 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3191,7 +3191,7 @@ create_addrmap_from_index (struct dwarf2_per_objfile *dwarf2_per_objfile, } objfile->partial_symtabs->psymtabs_addrmap - = addrmap_create_fixed (mutable_map, &objfile->objfile_obstack); + = addrmap_create_fixed (mutable_map, objfile->partial_symtabs->obstack ()); } /* Read the address map data from DWARF-5 .debug_aranges, and use it to @@ -3352,7 +3352,7 @@ create_addrmap_from_aranges (struct dwarf2_per_objfile *dwarf2_per_objfile, } objfile->partial_symtabs->psymtabs_addrmap - = addrmap_create_fixed (mutable_map, &objfile->objfile_obstack); + = addrmap_create_fixed (mutable_map, objfile->partial_symtabs->obstack ()); } /* Find a slot in the mapped index INDEX for the object named NAME. @@ -8491,7 +8491,7 @@ dwarf2_build_psymtabs_hard (struct dwarf2_per_objfile *dwarf2_per_objfile) objfile->partial_symtabs->psymtabs_addrmap = addrmap_create_fixed (objfile->partial_symtabs->psymtabs_addrmap, - &objfile->objfile_obstack); + objfile->partial_symtabs->obstack ()); /* At this point we want to keep the address map. */ save_psymtabs_addrmap.release (); |