From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway24.websitewelcome.com (gateway24.websitewelcome.com [192.185.50.252]) by sourceware.org (Postfix) with ESMTPS id 888CE393C86F for ; Fri, 28 Aug 2020 16:23:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 888CE393C86F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 061C95737E6 for ; Fri, 28 Aug 2020 11:23:53 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id BhAOkvzYuOIGpBhAOkURRM; Fri, 28 Aug 2020 11:23:53 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YdQHhbUBvXf3i2XoWvRnr2Mm9Zf4oKn98Gk0q4cNPjo=; b=GMhbxgSUuUiRH3m51TxJnTkRl2 N8v6/V5sGvPaDFq1CwUxB90sJCzn4YPBDoV0jiIQwOfycPn9iOM2w3JsLUnF3XNH8nxh72Yg6UF2d FxDxEFrmlSRvpdj6sBt5KyF2f; Received: from 71-218-12-75.hlrn.qwest.net ([71.218.12.75]:33904 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kBhAO-002WJo-LI; Fri, 28 Aug 2020 10:23:52 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 01/13] Add a new overload of gdb_bfd_sections Date: Fri, 28 Aug 2020 10:23:37 -0600 Message-Id: <20200828162349.987-2-tom@tromey.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200828162349.987-1-tom@tromey.com> References: <20200828162349.987-1-tom@tromey.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.12.75 X-Source-L: No X-Exim-ID: 1kBhAO-002WJo-LI X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-12-75.hlrn.qwest.net (bapiya.Home) [71.218.12.75]:33904 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3036.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_ABUSEAT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NEUTRAL, 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: Fri, 28 Aug 2020 16:23:55 -0000 This adds a new overload of gdb_bfd_sections, that accepts a gdb_bfd_ref_ptr. This also fixes the formatting of the existing function, since I happened to notice it was mildly off. gdb/ChangeLog 2020-08-28 Tom Tromey * gdb_bfd.h (gdb_bfd_sections): New overload. Fix formatting of existing function. --- gdb/ChangeLog | 5 +++++ gdb/gdb_bfd.h | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gdb/gdb_bfd.h b/gdb/gdb_bfd.h index 0f450567d50..12330970873 100644 --- a/gdb/gdb_bfd.h +++ b/gdb/gdb_bfd.h @@ -205,10 +205,16 @@ bool gdb_bfd_get_full_section_contents (bfd *abfd, asection *section, using gdb_bfd_section_iterator = next_iterator; using gdb_bfd_section_range = next_adapter; -static inline -gdb_bfd_section_range gdb_bfd_sections (bfd *abfd) +static inline gdb_bfd_section_range +gdb_bfd_sections (bfd *abfd) { return gdb_bfd_section_range (abfd->sections); } +static inline gdb_bfd_section_range +gdb_bfd_sections (const gdb_bfd_ref_ptr &abfd) +{ + return gdb_bfd_section_range (abfd->sections); +}; + #endif /* GDB_BFD_H */ -- 2.17.2