From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from beryx.lancelotsix.com (beryx.lancelotsix.com [IPv6:2001:41d0:401:3000::1ab3]) by sourceware.org (Postfix) with ESMTPS id CE077385800A for ; Thu, 31 Dec 2020 13:01:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CE077385800A Received: from [IPv6:2a02:390:8443:0:c4c8:3723:2c37:f63b] (unknown [IPv6:2a02:390:8443:0:c4c8:3723:2c37:f63b]) by beryx.lancelotsix.com (Postfix) with ESMTPSA id C64AD2E070; Thu, 31 Dec 2020 14:01:26 +0100 (CET) Subject: Re: [PATCH 1/2] typeprint.h: reorder struct declaration References: <20201231125324.14779-1-lsix@lancelotsix.com> <20201231125324.14779-2-lsix@lancelotsix.com> To: gdb-patches@sourceware.org Cc: Lancelot SIX From: Lancelot SIX Message-ID: Date: Thu, 31 Dec 2020 13:01:26 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201231125324.14779-2-lsix@lancelotsix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (beryx.lancelotsix.com [0.0.0.0]); Thu, 31 Dec 2020 14:01:26 +0100 (CET) X-Spam-Status: No, score=-15.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, 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: Thu, 31 Dec 2020 13:01:29 -0000 Hi On 31/12/2020 12:53, Lancelot SIX via Gdb-patches wrote: > Move the declaration of struct type_print_raw_options before struct > print_offset_data to ease upcoming changes. This is a helper commit > intended to make it easier to build a print_offset_data object from > configurations given by a type_print_raw_options. > > gdb/ChangeLog: > > * typeprint.h (struct type_print_options): move before > print_offsetdata Just realized I had formatting issues here. I’ll change that ASAP, with other elements that might come with reviews. When doing such modification, do I re-send the entire patches series or just the one affected? (I am not yet familiar with working with mailing-list based workflows). BR Lancelot > --- > gdb/typeprint.h | 60 ++++++++++++++++++++++++------------------------- > 1 file changed, 30 insertions(+), 30 deletions(-) > > diff --git a/gdb/typeprint.h b/gdb/typeprint.h > index d595cbe208..b75fa4d9f2 100644 > --- a/gdb/typeprint.h > +++ b/gdb/typeprint.h > @@ -26,6 +26,36 @@ struct ui_file; > struct typedef_hash_table; > struct ext_lang_type_printers; > > +struct type_print_options > +{ > + /* True means that no special printing flags should apply. */ > + unsigned int raw : 1; > + > + /* True means print methods in a class. */ > + unsigned int print_methods : 1; > + > + /* True means print typedefs in a class. */ > + unsigned int print_typedefs : 1; > + > + /* True means to print offsets, a la 'pahole'. */ > + unsigned int print_offsets : 1; > + > + /* The number of nested type definitions to print. -1 == all. */ > + int print_nested_type_limit; > + > + /* If not NULL, a local typedef hash table used when printing a > + type. */ > + typedef_hash_table *local_typedefs; > + > + /* If not NULL, a global typedef hash table used when printing a > + type. */ > + typedef_hash_table *global_typedefs; > + > + /* The list of type printers associated with the global typedef > + table. This is intentionally opaque. */ > + struct ext_lang_type_printers *global_printers; > +}; > + > struct print_offset_data > { > /* The offset to be applied to bitpos when PRINT_OFFSETS is true. > @@ -73,36 +103,6 @@ struct print_offset_data > const char *for_what); > }; > > -struct type_print_options > -{ > - /* True means that no special printing flags should apply. */ > - unsigned int raw : 1; > - > - /* True means print methods in a class. */ > - unsigned int print_methods : 1; > - > - /* True means print typedefs in a class. */ > - unsigned int print_typedefs : 1; > - > - /* True means to print offsets, a la 'pahole'. */ > - unsigned int print_offsets : 1; > - > - /* The number of nested type definitions to print. -1 == all. */ > - int print_nested_type_limit; > - > - /* If not NULL, a local typedef hash table used when printing a > - type. */ > - typedef_hash_table *local_typedefs; > - > - /* If not NULL, a global typedef hash table used when printing a > - type. */ > - typedef_hash_table *global_typedefs; > - > - /* The list of type printers associated with the global typedef > - table. This is intentionally opaque. */ > - struct ext_lang_type_printers *global_printers; > -}; > - > extern const struct type_print_options type_print_raw_options; > > /* A hash table holding typedef_field objects. This is more