From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39888 invoked by alias); 14 Dec 2017 16:30:40 -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 39623 invoked by uid 89); 14 Dec 2017 16:30:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*r:sk:1ePWO2-, H*r:sk:1ePWO3-, Hx-spam-relays-external:sk:1ePWO2-, H*RU:sk:1ePWO2- X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Dec 2017 16:30:14 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePWOc-0001LU-DF for gdb-patches@sourceware.org; Thu, 14 Dec 2017 11:30:10 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePWO3-0000jM-O3; Thu, 14 Dec 2017 11:29:31 -0500 Received: from [176.228.60.248] (port=3274 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ePWO2-00024t-Th; Thu, 14 Dec 2017 11:29:31 -0500 Date: Thu, 14 Dec 2017 16:30:00 -0000 Message-Id: <837etpuvbt.fsf@gnu.org> From: Eli Zaretskii To: Sergio Durigan Junior CC: gdb-patches@sourceware.org, tom@tromey.com, simon.marchi@ericsson.com, palves@redhat.com, keiths@redhat.com In-reply-to: <20171214024816.29629-3-sergiodj@redhat.com> (message from Sergio Durigan Junior on Wed, 13 Dec 2017 21:48:16 -0500) Subject: Re: [PATCH v6 2/2] Implement pahole-like 'ptype /o' option Reply-to: Eli Zaretskii References: <20171121160709.23248-1-sergiodj@redhat.com> <20171214024816.29629-1-sergiodj@redhat.com> <20171214024816.29629-3-sergiodj@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00350.txt.bz2 > From: Sergio Durigan Junior > Cc: Tom Tromey , > Eli Zaretskii , > Simon Marchi , > Pedro Alves , > Keith Seitz , > Sergio Durigan Junior > Date: Wed, 13 Dec 2017 21:48:16 -0500 > > gdb/ChangeLog: > yyyy-mm-dd Sergio Durigan Junior > Pedro Alves > > PR cli/16224 > * NEWS (Changes since GDB 8.0): Mention new '/o' flag. > * c-typeprint.c (OFFSET_SPC_LEN): New define. > (c_type_print_varspec_prefix): New argument 'struct > print_offset_data *'. > (c_type_print_base_1): New function and prototype. > (c_print_type_1): New function, with code from 'c_print_type'. > (c_print_type): Use 'c_print_type_1'. > (c_type_print_varspec_prefix): New argument 'struct > print_offset_data *'. Use it. Call 'c_type_print_base_1' > instead of 'c_print_type_base'. > (print_spaces_filtered_with_print_options): New function. > (output_access_specifier): Take new argument FLAGS. Modify > function to call 'print_spaces_filtered_with_print_options'. > (c_print_type_vtable_offset_marker): New function. > (c_print_type_union_field_offset): New function. > (c_print_type_struct_field_offset): New function. > (c_type_print_base_struct_union): New argument 'struct > print_offset_data *'. Print offsets and sizes for > struct/union/class fields. > * typeprint.c (const struct type_print_options > type_print_raw_options): Initialize 'print_offsets'. > (static struct type_print_options default_ptype_flags): > Likewise. > (struct print_offset_data print_offset_default_data): New > variable. > (whatis_exp): Handle '/o' option. > (_initialize_typeprint): Add '/o' flag to ptype's help. > * typeprint.h (struct print_offset_data): New struct. > (struct type_print_options) : New field. > > gdb/testsuite/ChangeLog: > yyyy-mm-dd Sergio Durigan Junior > > PR cli/16224 > * gdb.base/ptype-offsets.cc: New file. > * gdb.base/ptype-offsets.exp: New file. > > gdb/doc/ChangeLog: > yyyy-mm-dd Sergio Durigan Junior > > PR cli/16224 > * gdb.texinfo (ptype): Add documentation for new flag '/o'. OK for the documentation parts, thanks.