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/psymtab.h | |
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/psymtab.h')
-rw-r--r-- | gdb/psymtab.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/psymtab.h b/gdb/psymtab.h index 895f950..d0e5969 100644 --- a/gdb/psymtab.h +++ b/gdb/psymtab.h @@ -55,6 +55,13 @@ public: void discard_psymtab (struct partial_symtab *pst); + /* Return the obstack that is used for storage by this object. */ + + struct obstack *obstack () + { + return m_obstack; + } + /* Each objfile points to a linked list of partial symtabs derived from this file, one partial symtab structure for each compilation unit @@ -73,10 +80,6 @@ public: struct partial_symtab *free_psymtabs = nullptr; - /* The obstack where allocations are made. */ - - struct obstack *obstack; - /* A byte cache where we can stash arbitrary "chunks" of bytes that will not change. */ @@ -87,6 +90,12 @@ public: std::vector<partial_symbol *> global_psymbols; std::vector<partial_symbol *> static_psymbols; + +private: + + /* The obstack where allocations are made. */ + + struct obstack *m_obstack; }; |