From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130491 invoked by alias); 30 Apr 2019 15:44:09 -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 130482 invoked by uid 89); 30 Apr 2019 15:44:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:0700, 20190409, 2019-04-09, our X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Apr 2019 15:44:07 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hLUvO-0005ZO-5I from Sandra_Loosemore@mentor.com ; Tue, 30 Apr 2019 08:44:06 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 30 Apr 2019 08:44:03 -0700 Subject: Re: [PATCH 3/3] Introduce a separate debug objfile iterator To: Tom Tromey , References: <20190409180945.21621-1-tom@tromey.com> <20190409180945.21621-4-tom@tromey.com> From: Sandra Loosemore Message-ID: Date: Tue, 30 Apr 2019 15:44:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190409180945.21621-4-tom@tromey.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2019-04/txt/msg00654.txt.bz2 On 4/9/19 12:09 PM, Tom Tromey wrote: > This introduces a new iterator and range adapter for iteration over > the separate debug files of a given objfile. As in the current > approach, the requested objfile is returned first, followed by the > separate debug objfiles. > > gdb/ChangeLog > 2019-04-09 Tom Tromey > > * symtab.c (lookup_global_symbol_from_objfile) > (lookup_symbol_in_objfile_from_linkage_name): Use the iterator. > * objfiles.h (class separate_debug_iterator): New. > (class separate_debug_range): New. > (struct objfile) : New method. > (objfile_separate_debug_iterate): Don't declare. > * objfiles.c (separate_debug_iterator::operator++): Rename from > objfile_separate_debug_iterate. > (objfile_relocate, objfile_rebase, objfile_has_symbols): Use the > iterator. > * minsyms.c (lookup_minimal_symbol_by_pc_section): Use the > iterator. FYI, this series of patches has broken builds with older versions of GCC (we've got 5.2.1 installed on our build system here). Multiple failures like: /path/to/gdb/minsyms.c: In function 'bound_minimal_symbol lookup_minimal_symbol_by_pc_section(CORE_ADDR, obj_section*, lookup_msym_prefer)': /path/to/gdb/minsyms.c:724:8: error: types may not be defined in a for-range-declaration [-Werror] for (struct objfile *objfile : section->objfile->separate_debug_objfiles ()) ^~~~~~ -Sandra