From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33062 invoked by alias); 27 Nov 2017 22:20:34 -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 33047 invoked by uid 89); 27 Nov 2017 22:20:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=strategic, widen, Hx-languages-length:949 X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Nov 2017 22:20:32 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 86277DFC39 for ; Mon, 27 Nov 2017 16:16:11 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id JRhDeLNTnRtUXJRhDeStuc; Mon, 27 Nov 2017 16:16:11 -0600 Received: from 71-218-90-63.hlrn.qwest.net ([71.218.90.63]:55890 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eJRhD-001NZ9-AD; Mon, 27 Nov 2017 16:16:11 -0600 From: Tom Tromey To: Sergio Durigan Junior Cc: Tom Tromey , GDB Patches Subject: Re: [PATCH] Implement pahole-like 'ptype /o' option References: <20171121160709.23248-1-sergiodj@redhat.com> <87tvxgvo18.fsf@tromey.com> <87a7z7pkf4.fsf@redhat.com> Date: Mon, 27 Nov 2017 22:20:00 -0000 In-Reply-To: <87a7z7pkf4.fsf@redhat.com> (Sergio Durigan Junior's message of "Mon, 27 Nov 2017 14:54:07 -0500") Message-ID: <87wp2b8j11.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1eJRhD-001NZ9-AD X-Source-Sender: 71-218-90-63.hlrn.qwest.net (pokyo) [71.218.90.63]:55890 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2017-11/txt/msg00703.txt.bz2 >>>>> "Sergio" == Sergio Durigan Junior writes: Sergio> I think for 'ptype /o' the best would be to stick with 2 levels, because Sergio> otherwise the output gets too messed up. But I've been thinking about Sergio> sending another patch to enable the multi-level ptype anyway. I see what you mean, though I wonder if it's better to just overflow and let users with deeply-nested types just widen their terminals. Alternatively the code could wrap_here() at strategic points. >> ... though the old code's output is kind of confusing, restarting the >> offset at 0 in the embedded struct. Sergio> The way my code is written, it also restarts the offset at 0. Do you Sergio> think it'd be better to keep using the offset from the outter struct? I am not 100% certain but I tend to think it's more understandable to have the offsets refer to the outermost structure. Tom