From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130001 invoked by alias); 21 Nov 2017 17:00:36 -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 125454 invoked by uid 89); 21 Nov 2017 17:00:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.7 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=fight X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Nov 2017 17:00:24 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C01AEC053FB7; Tue, 21 Nov 2017 17:00:14 +0000 (UTC) Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9872B60010; Tue, 21 Nov 2017 17:00:14 +0000 (UTC) From: Sergio Durigan Junior To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Implement pahole-like 'ptype /o' option References: <20171121160709.23248-1-sergiodj@redhat.com> <83bmjvd19e.fsf@gnu.org> Date: Tue, 21 Nov 2017 17:00:00 -0000 In-Reply-To: <83bmjvd19e.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 21 Nov 2017 18:50:37 +0200") Message-ID: <87shd7mush.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00448.txt.bz2 On Tuesday, November 21 2017, Eli Zaretskii wrote: >> From: Sergio Durigan Junior >> Cc: Sergio Durigan Junior >> Date: Tue, 21 Nov 2017 11:07:09 -0500 >> >> gdb/NEWS | 3 + >> gdb/c-typeprint.c | 144 ++++++++++++++++++++++++++++--- >> gdb/doc/gdb.texinfo | 4 + >> gdb/testsuite/gdb.base/ptype-offsets.cc | 77 +++++++++++++++++ >> gdb/testsuite/gdb.base/ptype-offsets.exp | 52 +++++++++++ >> gdb/typeprint.c | 8 +- >> gdb/typeprint.h | 3 + >> 7 files changed, 276 insertions(+), 15 deletions(-) >> create mode 100644 gdb/testsuite/gdb.base/ptype-offsets.cc >> create mode 100644 gdb/testsuite/gdb.base/ptype-offsets.exp > > The documentation parts are okay, but ... > >> +@item o >> +Print the offsets and sizes of fields in a struct, similar to what the >> +@command{pahole} tool does. > > ... how about an example showing the output of this? I, for one, have > never heard of 'pahole', so the reference to it won't help the likes > of myself to understand what will be produced. Good point. I will include an example output, then. > And here: > >> + /o print offsets and sizes of fields in a struct (like pahole)\n")); > > I wonder whether we should mention 'pahole' at all. I thought that it was good to mention 'pahole' here because that was the main motivation for writing this patch. My feeling is that it's benefitial to mention 'pahole' because even if the user doesn't know what it is, this will be a good opportunity for them to learn :-). But that's my personal opinion; I won't fight if you think the reference should be removed. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/