From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uPzkOAqRIWBhSAAAWB0awg (envelope-from ) for ; Mon, 08 Feb 2021 14:29:14 -0500 Received: by simark.ca (Postfix, from userid 112) id E66761EF4F; Mon, 8 Feb 2021 14:29:14 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 1651C1E4A3 for ; Mon, 8 Feb 2021 14:29:14 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D0EC1384BC14; Mon, 8 Feb 2021 19:29:13 +0000 (GMT) Received: from gateway22.websitewelcome.com (gateway22.websitewelcome.com [192.185.47.65]) by sourceware.org (Postfix) with ESMTPS id BF72B385043C for ; Mon, 8 Feb 2021 19:29:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BF72B385043C 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 gateway22.websitewelcome.com (Postfix) with ESMTP id 1EA6E2900B for ; Mon, 8 Feb 2021 13:29:11 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 9CDelZ3H3SrGM9CDelBC2j; Mon, 08 Feb 2021 13:29:11 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To: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=UshGRhJxlXF0S0h+DXRJ2kqW942mAkzxFxQqLkP5D7E=; b=T3HMK9Uwlk/XZY3E5w6rrekDMy QAup/0kvAMTLv2eMZ2/H+m6s5yzEWU59TXGiG3l1iCk4jlQGEsK+xYJpepyo0wQu+pFCARUluNeVP v8sKoprkxr3PFMb7oqLcKGRoh; Received: from 97-122-91-54.hlrn.qwest.net ([97.122.91.54]:36946 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l9CDe-001HKZ-9O; Mon, 08 Feb 2021 12:29:10 -0700 From: Tom Tromey To: Andrew Burgess Subject: Re: [PATCH 2/3] gdb: 'maint info sections' - handle the no executable case References: X-Attribution: Tom Date: Mon, 08 Feb 2021 12:29:09 -0700 In-Reply-To: (Andrew Burgess's message of "Fri, 5 Feb 2021 21:29:10 +0000") Message-ID: <871rdqgxyy.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 97.122.91.54 X-Source-L: No X-Exim-ID: 1l9CDe-001HKZ-9O X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-91-54.hlrn.qwest.net (murgatroyd) [97.122.91.54]:36946 X-Source-Auth: tom+tromey.com X-Email-Count: 9 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes 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: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" >>>>> "Andrew" == Andrew Burgess writes: Andrew> Unfortunately, when I tried to use 'maint info sections' I saw Andrew> nothing. The reason is that the loop over all object files is hidden Andrew> behind a check that we have a main executable. Andrew> This commit removes this check and merges together some duplicate Andrew> code. I also (I think) made the output of this command cleaner. Yeah, I agree. Andrew> gdb/ChangeLog: Andrew> * maint.c (print_bfd_section_info_maybe_relocated): Delete, Andrew> functionality merged into... Andrew> (maint_print_all_sections): ...this new function. Andrew> (maintenance_info_sections): Make use of maint_print_all_sections, Andrew> allow all objects to be printed even where there's no executable. Andrew> gdb/testsuite/ChangeLog: Andrew> * gdb.base/maint-info-sections.exp: Update expected output, and Andrew> add additional tests. Looks good. Tom