diff options
author | Tom Tromey <tom@tromey.com> | 2019-10-16 14:06:43 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-01-26 16:40:20 -0700 |
commit | 6f17252b76dbe8bedd32b6df6ce52af707bfb04b (patch) | |
tree | 57515b3759448d0f1ab318cb89233e3e82ca553b /gdb/psymtab.h | |
parent | f6f1cebcbe4dd33cdd65094267cc33395d55ece7 (diff) | |
download | gdb-6f17252b76dbe8bedd32b6df6ce52af707bfb04b.zip gdb-6f17252b76dbe8bedd32b6df6ce52af707bfb04b.tar.gz gdb-6f17252b76dbe8bedd32b6df6ce52af707bfb04b.tar.bz2 |
Use new and delete for psymtabs
This changes psymtabs to be allocated with new and destroyed with
delete. As a consequence, the psymtab free-list is also removed.
The motivation for this is to let symbol readers subclass
partial_symtab.
gdb/ChangeLog
2020-01-26 Tom Tromey <tom@tromey.com>
* mdebugread.c (parse_partial_symbols): Use discard_psymtab.
* psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
* psymtab.c (psymtab_storage): Delete psymtabs.
(psymtab_storage::allocate_psymtab): Use new.
(psymtab_storage::discard_psymtab): Use delete.
* psympriv.h (struct partial_symtab): Add constructor and
initializers.
Change-Id: I4e78ac538fc0ea52b57489c1afb8f935a30941ef
Diffstat (limited to 'gdb/psymtab.h')
-rw-r--r-- | gdb/psymtab.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/gdb/psymtab.h b/gdb/psymtab.h index eaeac49..c0f0a97 100644 --- a/gdb/psymtab.h +++ b/gdb/psymtab.h @@ -130,10 +130,6 @@ public: private: - /* List of freed partial symtabs, available for re-use. */ - - struct partial_symtab *free_psymtabs = nullptr; - /* The obstack where allocations are made. This is lazily allocated so that we don't waste memory when there are no psymtabs. */ |