From c3693a1d9466bc9d3abe004e66f1b56fed22ba61 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 22 Oct 2019 17:08:16 -0600 Subject: Turn start_psymtab_common into a constructor This turns start_psymtab_common into a constructor, and then changes the callers to use "new" directly. This completes the psymtab allocation transition -- now it is possible for symbol readers to subclass struct partial_symtab. gdb/ChangeLog 2020-01-26 Tom Tromey * xcoffread.c (xcoff_start_psymtab): Use new. * psymtab.c (partial_symtab::partial_symtab): New constructor, renamed from start_psymtab_common. * psympriv.h (struct partial_symtab): Add new constructor. (start_psymtab_common): Don't declare. * mdebugread.c (parse_partial_symbols): Use new. * dwarf2read.c (create_partial_symtab): Use new. * dbxread.c (start_psymtab): Use new. * ctfread.c (create_partial_symtab): Use new. Change-Id: I5a0217bcb52bcfa442559771954bb66bd9ccbf02 --- gdb/dbxread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/dbxread.c') diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 9527085..4e388fae 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1903,8 +1903,8 @@ static struct partial_symtab * start_psymtab (struct objfile *objfile, const char *filename, CORE_ADDR textlow, int ldsymoff) { - struct partial_symtab *result = - start_psymtab_common (objfile, filename, textlow); + struct partial_symtab *result = new partial_symtab (filename, objfile, + textlow); result->read_symtab_private = XOBNEW (&objfile->objfile_obstack, struct symloc); -- cgit v1.1