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/psympriv.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gdb/psympriv.h') diff --git a/gdb/psympriv.h b/gdb/psympriv.h index 74ff10e..82ae1b5 100644 --- a/gdb/psympriv.h +++ b/gdb/psympriv.h @@ -113,6 +113,14 @@ struct partial_symtab partial_symtab (const char *filename, struct objfile *objfile) ATTRIBUTE_NONNULL (2) ATTRIBUTE_NONNULL (3); + /* Like the above, but also sets the initial text low and text high + from the ADDR argument, and sets the global- and + static-offsets. */ + + partial_symtab (const char *filename, struct objfile *objfile, + CORE_ADDR addr) + ATTRIBUTE_NONNULL (2) ATTRIBUTE_NONNULL (3); + /* Return the raw low text address of this partial_symtab. */ CORE_ADDR raw_text_low () const { @@ -326,9 +334,6 @@ extern void add_psymbol_to_list (gdb::string_view name, extern void init_psymbol_list (struct objfile *objfile, int total_symbols); -extern struct partial_symtab *start_psymtab_common (struct objfile *, - const char *, CORE_ADDR); - extern void end_psymtab_common (struct objfile *, struct partial_symtab *); static inline void -- cgit v1.1