From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 8E8F33858004 for ; Mon, 22 Mar 2021 13:52:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8E8F33858004 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 12MDqcNc018249 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Mar 2021 09:52:42 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 12MDqcNc018249 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id E0E0E1E54D; Mon, 22 Mar 2021 09:52:37 -0400 (EDT) Subject: Re: [PATCH 05/26] Introduce method wrappers for quick_symbol_functions To: Tom Tromey , gdb-patches@sourceware.org References: <20210228203803.1693413-1-tom@tromey.com> <20210228203803.1693413-6-tom@tromey.com> From: Simon Marchi Message-ID: Date: Mon, 22 Mar 2021 09:52:37 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210228203803.1693413-6-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 22 Mar 2021 13:52:38 +0000 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2021 13:52:44 -0000 On 2021-02-28 3:37 p.m., Tom Tromey wrote: > This introduces wrappers for each function in quick_symbol_functions. > The wrappers are methods on objfile, and are defined in > symfile-debug.c, so that they can use the symfile_debug variable. > Places that call the quick functions are all updated to call these new > wrapper methods. > > gdb/ChangeLog > 2021-02-28 Tom Tromey > > * symtab.c (iterate_over_symtabs, expand_symtab_containing_pc) > (lookup_symbol_via_quick_fns, find_quick_global_symbol_language) > (basic_lookup_transparent_type_quick) > (find_pc_sect_compunit_symtab, find_symbol_at_address) > (find_line_symtab, global_symbol_searcher::expand_symtabs): > Update. > * symmisc.c (print_objfile_statistics, dump_objfile) > (maintenance_expand_symtabs): Update. > * symfile.c (symbol_file_add_with_addrs) > (expand_symtabs_matching, map_symbol_filenames): Update. > * symfile-debug.c (objfile::has_partial_symbols) > (objfile::find_last_source_symtab) > (objfile::forget_cached_source_info) > (objfile::map_symtabs_matching_filename, objfile::lookup_symbol) > (objfile::print_stats, objfile::dump) > (objfile::expand_symtabs_for_function) > (objfile::expand_all_symtabs) > (objfile::expand_symtabs_with_fullname) > (objfile::map_matching_symbols) > (objfile::expand_symtabs_matching) > (objfile::find_pc_sect_compunit_symtab) > (objfile::map_symbol_filenames) > (objfile::find_compunit_symtab_by_address) > (objfile::lookup_global_symbol_language): New methods. > (debug_sym_quick_functions): Remove. > (debug_sym_fns, install_symfile_debug_logging): Update. > * source.c (forget_cached_source_info_for_objfile) > (select_source_symtab): Update. > * objfiles.h (struct objfile): Add methods corresponding to > quick_symbol_functions. > * objfiles.c (objfile::has_partial_symbols): Move to > symfile-debug.c. > * linespec.c (iterate_over_all_matching_symtabs): Update. > * cp-support.c (add_symbol_overload_list_qualified): Update. > * ada-lang.c (add_nonlocal_symbols): Update. A bit late, but: wouldn't it be better to have the objfile methods implemented in objfiles.c, and just export the symfile_debug variable? We already have some _debug variables exported, this wouldn't be a problem. Simon