From 32caafd02b069c36908f41f53ae0cbca1911aaca Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 22 Oct 2019 16:57:35 -0600 Subject: Change allocate_psymtab to be a constructor This is the next step in getting the symbol readers to allocate psymtabs themselves: change allocate_psymtab to be an ordinary constructor, and then use "new" at the previous call sites. Note that this doesn't get us all the way -- start_psymtab_common is still allocating a partial symtab. gdb/ChangeLog 2020-01-26 Tom Tromey * xcoffread.c (xcoff_end_psymtab): Use new. * psymtab.c (start_psymtab_common): Use new. (partial_symtab::partial_symtab): Rename from allocate_psymtab. Update. * psympriv.h (struct partial_symtab): Add parameters to constructor. Don't inline. (allocate_psymtab): Don't declare. * mdebugread.c (new_psymtab): Use new. * dwarf2read.c (dwarf2_create_include_psymtab): Use new. * dbxread.c (dbx_end_psymtab): Use new. Change-Id: Iffeae64c925050b90b9916cbc36e15b26ff42226 --- 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 f28c0b2..2ec30ec 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -4662,7 +4662,7 @@ new_psymtab (const char *name, struct objfile *objfile) { struct partial_symtab *psymtab; - psymtab = allocate_psymtab (name, objfile); + psymtab = new partial_symtab (name, objfile); /* Keep a backpointer to the file's symbols. */ -- cgit v1.1