From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22564 invoked by alias); 18 May 2018 18:51:46 -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 22551 invoked by uid 89); 18 May 2018 18:51:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:866 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 May 2018 18:51:44 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2BB43117DBD; Fri, 18 May 2018 14:51:43 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3aRTRSioOzJ9; Fri, 18 May 2018 14:51:43 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id EEA44117DB3; Fri, 18 May 2018 14:51:42 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 40BD48304E; Fri, 18 May 2018 11:51:41 -0700 (PDT) Date: Fri, 18 May 2018 19:03:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Show padding in ptype/o output Message-ID: <20180518185141.ihjr6fvfcqivtfss@adacore.com> References: <20180517212307.29102-1-tom@tromey.com> <87vabm2cvh.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87vabm2cvh.fsf@tromey.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-05/txt/msg00409.txt.bz2 > commit f4c9741648a991f4591b290000214a9dbaf8099a > Author: Tom Tromey > Date: Sat May 12 17:04:50 2018 -0600 > > Show padding in ptype/o output > > I was recently using ptype/o to look at the layout of some objects in > gdb. I noticed that trailing padding was not shown -- but I wanted to > be able to look at that, too. > > This patch changes ptype/o to also print trailing holes. > > Tested on x86-64 Fedora 26. > > gdb/ChangeLog > 2018-05-17 Tom Tromey > > * c-typeprint.c (maybe_print_hole): New function. > (c_print_type_struct_field_offset): Update. > (c_type_print_base_struct_union): Call maybe_print_hole. > > gdb/testsuite/ChangeLog > 2018-05-17 Tom Tromey > > * gdb.base/ptype-offsets.exp: Update. Looks good to me, Tom. Thanks for this enhancement! -- Joel