From 6f17252b76dbe8bedd32b6df6ce52af707bfb04b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 16 Oct 2019 14:06:43 -0600 Subject: 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 * mdebugread.c (parse_partial_symbols): Use discard_psymtab. * psymtab.h (class psymtab_storage) : 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 --- gdb/mdebugread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/mdebugread.c') diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index b1994f1..393a433 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -3747,7 +3747,7 @@ parse_partial_symbols (minimal_symbol_reader &reader, && pst->number_of_dependencies == 0 && pst->n_global_syms == 0 && pst->n_static_syms == 0) - objfile->partial_symtabs->psymtabs = NULL; + objfile->partial_symtabs->discard_psymtab (pst); } /* If the current psymbol has an enumerated type, we need to add -- cgit v1.1