From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59627 invoked by alias); 23 Jan 2020 22:49:44 -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 59619 invoked by uid 89); 23 Jan 2020 22:49:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= 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, 23 Jan 2020 22:49:43 +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 00NMnZhG017667 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Jan 2020 17:49:40 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 00NMnZhG017667 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1579819780; bh=jg9a3X9tgHd0dLras748Ddi+PtnUO53OTDQAcbt6LE8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=V7rNbA1jmwbzNoSYFhEvAWxuuYDMxoUZ2x3q9SGsz/3zlkSOj/n26mUBRnL19JXnT ExPYOsqVGGu+IzJM0kQhj+hWYUFGDR6c+B6DHcDWuvsyDArdBQbVdAqPu84aP7VQDe uNthXTRNqEgSzWAn3t9lmhyA6eaBlB+uTNxz+mfs= Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (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 0ABB01E5FD; Thu, 23 Jan 2020 17:49:34 -0500 (EST) Subject: Re: [PATCH] gdb: introduce objfile text_section_offset and data_section_offset methods To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20200114050342.972630-1-simon.marchi@polymtl.ca> <87o8utpzi1.fsf@tromey.com> From: Simon Marchi Message-ID: <52840cc9-509d-6834-f136-7fd68a060de0@polymtl.ca> Date: Thu, 23 Jan 2020 22:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <87o8utpzi1.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00769.txt.bz2 On 2020-01-23 5:41 p.m., Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> The pattern > Simon> objfile-> section_offsets[SECT_OFF_TEXT (objfile)] > > Simon> ... appears very often, to get the offset of the text section of an > Simon> objfile. I thought it would be more readable to write it as: > > Simon> objfile-> text_section_offset () > > Simon> ... so I added this method and used it where possible. I also added > Simon> data_section_offset, although it is not used as much. > > Thanks. This looks good to me. > > Tom > Thanks, I'll make sure it still builds and then push it. Simon