forked from Imagelibrary/binutils-gdb
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 <tom@tromey.com> * 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
This commit is contained in:
@@ -2609,9 +2609,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
|
||||
textlow = fh->adr;
|
||||
else
|
||||
textlow = 0;
|
||||
pst = start_psymtab_common (objfile,
|
||||
fdr_name (fh),
|
||||
textlow);
|
||||
pst = new partial_symtab (fdr_name (fh), objfile, textlow);
|
||||
pst->read_symtab_private = XOBNEW (&objfile->objfile_obstack, symloc);
|
||||
memset (pst->read_symtab_private, 0, sizeof (struct symloc));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user