From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53855 invoked by alias); 2 Apr 2018 17:21:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 53843 invoked by uid 89); 2 Apr 2018 17:21:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=appreciated! X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Apr 2018 17:21:30 +0000 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 w32HLNoJ025539 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 2 Apr 2018 13:21:28 -0400 Received: by simark.ca (Postfix, from userid 112) id C1BC31E77E; Mon, 2 Apr 2018 13:21:23 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id BD45D1E4C2; Mon, 2 Apr 2018 13:21:18 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 02 Apr 2018 17:21:00 -0000 From: Simon Marchi To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/5] Replace dw2_get_cu/dw2_get_cutu with methods of dwarf2_per_objfile In-Reply-To: <20180402161753.sq7cnm3shwbwtsgy@adacore.com> References: <20180401000444.13490-1-simon.marchi@polymtl.ca> <20180401000444.13490-3-simon.marchi@polymtl.ca> <20180402161753.sq7cnm3shwbwtsgy@adacore.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.4 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 2 Apr 2018 17:21:23 +0000 X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00043.txt.bz2 On 2018-04-02 12:17, Joel Brobecker wrote: > Hi Simon, > > On Sat, Mar 31, 2018 at 08:04:41PM -0400, Simon Marchi wrote: >> Those two functions look like good candidates to become methods of >> dwarf2_per_objfile. I did that, and added get_tu as well. When >> replacing usages of dw2_get_cutu, I changed some instances to get_cutu >> and others to get_cu, when appropriate (when we know we want a CU and >> not a TU). >> >> gdb/ChangeLog: >> >> * dwarf2read.h (struct signatured_type): Forward declare. >> (struct dwarf2_per_objfile) : >> New methods. >> * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from... >> (dw2_get_cutu): ...this. >> (dwarf2_per_objfile::get_cu): Rename from... >> (dw2_get_cu): ...this. >> (dwarf2_per_objfile::get_tu): New. >> (create_addrmap_from_index): Adjust. >> (create_addrmap_from_aranges): Adjust. >> (dw2_find_last_source_symtab): Adjust. >> (dw2_map_symtabs_matching_filename): Adjust. >> (dw2_symtab_iter_next): Adjust. >> (dw2_print_stats): Adjust. >> (dw2_expand_all_symtabs): Adjust. >> (dw2_expand_symtabs_with_fullname): Adjust. >> (dw2_expand_marked_cus): Adjust. >> (dw_expand_symtabs_matching_file_matcher): Adjust. >> (dw2_map_symbol_filenames): Adjust. >> (dw2_debug_names_iterator::next): Adjust. >> (dwarf2_initialize_objfile): Adjust. >> (set_partial_user): Adjust. >> (dwarf2_build_psymtabs_hard): Adjust. > > Got time to look at this one to (and discover the dw2_get_cutu > function). > The patch looks good to me. Not only that, I see that you changed some > of the "get_cutu" calls to either ::get_cu or ::get_tu when there was > enough context to know which one it was that we were handling. This is > a very nice enhancement, in my opinion. > > That's all the time I have to review this patch series for now. > I may or may not be able to review the rest, so please anyone feel > free to take a look. Thanks, your input is appreciated!