From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61999 invoked by alias); 10 May 2018 21:04:38 -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 61986 invoked by uid 89); 10 May 2018 21:04:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:982 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; Thu, 10 May 2018 21:04:36 +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 w4AL4TpC017054 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 May 2018 17:04:34 -0400 Received: by simark.ca (Postfix, from userid 112) id C4CE81F214; Thu, 10 May 2018 17:04:29 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 1791F1E56F; Thu, 10 May 2018 17:04:29 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 10 May 2018 21:18:00 -0000 From: Simon Marchi To: Tom Tromey Cc: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH RFC 3/5] Make index reading functions more modular In-Reply-To: <8736yz1bbd.fsf@tromey.com> References: <1525901216-15031-1-git-send-email-simon.marchi@ericsson.com> <1525901216-15031-4-git-send-email-simon.marchi@ericsson.com> <8736yz1bbd.fsf@tromey.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 10 May 2018 21:04:29 +0000 X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00269.txt.bz2 On 2018-05-10 16:54, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> The read_gdb_index_from_section and > read_debug_names_from_section > Simon> functions read the index content, as their names state, from > sections of > Simon> object files. A following patch will make it possible to read > index > Simon> content from standalone files. > > Simon> This patch therefore decouples the code that reads the index > content > Simon> from object file sections from the code that processes that > content. > Simon> Functions dwarf2_read_gdb_index and dwarf2_read_debug_names > receive > Simon> callbacks that are responsible for providing the index contents > (for > Simon> both the main file and the potential dwz file). > > This callback style makes the code harder to read and understand; but > other than that this seems fine. Indeed, I'm open to suggestions :). Simon