From 2467f4f6a533a28047e0b45ce716b9b1f9f72a09 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 24 Apr 2020 15:35:01 -0600 Subject: Introduce new add_psymbol_to_list overload This adds a new overload of add_psymbol_to_list. This one takes an already constructed psymbol and adds it to the bcache and the appropriate list. This seemed cleaner than continuing to add parameters to the existing add_psymbol_to_list, and is more in line with how full symbols are constructed. gdb/ChangeLog 2020-04-24 Tom Tromey * psymtab.c (add_psymbol_to_bcache): Simplify calling convention. (add_psymbol_to_list): New overload. Make old overload call new one. * psympriv.h (add_psymbol_to_list): New overload. --- gdb/psympriv.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/psympriv.h') diff --git a/gdb/psympriv.h b/gdb/psympriv.h index fdcee99..6f0307e 100644 --- a/gdb/psympriv.h +++ b/gdb/psympriv.h @@ -424,6 +424,14 @@ extern void add_psymbol_to_list (gdb::string_view name, enum language language, struct objfile *objfile); +/* Add a symbol to the partial symbol table of OBJFILE. The psymbol + must be fully constructed, and the names must be set and intern'd + as appropriate. */ + +extern void add_psymbol_to_list (const partial_symbol &psym, + psymbol_placement where, + struct objfile *objfile); + /* Initialize storage for partial symbols. If partial symbol storage has already been initialized, this does nothing. TOTAL_SYMBOLS is an estimate of how many symbols there will be. */ -- cgit v1.1