From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id 068D93857035 for ; Mon, 13 Jul 2020 17:33:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 068D93857035 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-392-6AGRthtCNm200l9NaSXHhw-1; Mon, 13 Jul 2020 13:33:34 -0400 X-MC-Unique: 6AGRthtCNm200l9NaSXHhw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E9FC100A8F7 for ; Mon, 13 Jul 2020 17:33:33 +0000 (UTC) Received: from f32-m1.lan (ovpn-112-21.phx2.redhat.com [10.3.112.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0960B5D9CC; Mon, 13 Jul 2020 17:33:32 +0000 (UTC) Date: Mon, 13 Jul 2020 10:33:32 -0700 From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Pedro Alves Subject: Re: [PATCH v4 12/14] Add new command "maint print core-file-backed-mappings" Message-ID: <20200713103332.6d8e1fb9@f32-m1.lan> In-Reply-To: <24e598f3-2de5-f34c-c4ab-47a1cda89ec9@palves.net> References: <20200705225807.2264705-1-kevinb@redhat.com> <20200705225807.2264705-13-kevinb@redhat.com> <24e598f3-2de5-f34c-c4ab-47a1cda89ec9@palves.net> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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: Mon, 13 Jul 2020 17:33:37 -0000 On Fri, 10 Jul 2020 21:08:15 +0100 Pedro Alves wrote: > I don't understand what this command provides that "info proc mappings" > doesn't? Can you give an example of when you'd use this command > over "info proc mappings" ? I wanted it while adding core file note support for FreeBSD. I wanted to check that 1) the mappings were actually be loaded and 2) the mappings loaded by corelow.c were correct. I think it might be occasionally useful by other GDB developers for debugging core file related problems. A normal GDB user won't use this command; that's why it's a maintenance command. Depending on the OS there may be differences between "info proc mappings" and this new maintenance command. At the moment, there aren't any differences on Linux, but there will be for FreeBSD. FreeBSD provides more mappings and more fields for each mapping. I would expect that "info proc mappings" on FreeBSD will show all mappings along with the additional fields. The maintenance command will show a subset of that information; as such it might not seem terribly useful, but the point of it is to output information from the corelow.c created data structures so that a developer can check that they exist and are correct. I'll add a few more words to the commit log. Kevin