From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by sourceware.org (Postfix) with ESMTPS id 52E6D385BF92 for ; Thu, 2 Apr 2020 19:47:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 52E6D385BF92 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id BC40A27F255; Thu, 2 Apr 2020 15:47:22 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id V7Pkp0CkQqdy; Thu, 2 Apr 2020 15:47:22 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 9055B27F340; Thu, 2 Apr 2020 15:47:22 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 9055B27F340 X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YExx_OUjcDAF; Thu, 2 Apr 2020 15:47:22 -0400 (EDT) Received: from [10.0.0.11] (unknown [192.222.164.54]) by mail.efficios.com (Postfix) with ESMTPSA id 6861627F146; Thu, 2 Apr 2020 15:47:22 -0400 (EDT) Subject: Re: [PATCH] gdb: use bfd_get_section_contents to read section contents in, is_linked_with_cygwin_dll To: Tom Tromey , Simon Marchi via Gdb-patches Cc: Simon Marchi , Pedro Alves , Jon Turney References: <20200316170845.184386-1-simon.marchi@polymtl.ca> <20200316170845.184386-7-simon.marchi@polymtl.ca> <0b76517a-f6dd-0aa8-17fb-ce5a9accbf42@redhat.com> <87ftdmvx85.fsf@tromey.com> <6b6b7467-2db4-56c9-dd98-3082b7b68abe@polymtl.ca> <878sjdvhi4.fsf@tromey.com> <9b3e78c7-5df5-aa83-d04c-0060b4c75ce7@polymtl.ca> <87pncpu0xe.fsf@tromey.com> From: Simon Marchi Message-ID: Date: Thu, 2 Apr 2020 15:47:21 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <87pncpu0xe.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, 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: Thu, 02 Apr 2020 19:47:24 -0000 On 2020-04-02 3:45 p.m., Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi via Gdb-patches writes: > > Simon> + return bfd_get_section_contents (abfd, section, contents->data (), offset, count); >>> >>> This line looks too long. > > It's still too long in this version. Sorry, I missed that comment earlier. Fixed now. > Simon> Now that I re-read it, I don't think the function should take the extra OFFSET and > Simon> COUNT parameters, since they are not used anywhere. I went around our calls to > Simon> bfd_get_section_contents, and I don't think they would be very useful. And I would > Simon> prefer not to check in code if it's not going to be exercised. > > Simon> So I'd go with this simpler version instead. The extra complexity can be added later, > Simon> if needed. > > Sounds reasonable to me. Thanks, I'm pushing it with the above issue fixed. Simon