From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115136 invoked by alias); 1 Dec 2017 12:36:09 -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 115114 invoked by uid 89); 1 Dec 2017 12:36:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=person 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; Fri, 01 Dec 2017 12:36:07 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 82756C059B73 for ; Fri, 1 Dec 2017 12:36:06 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB8A26A020; Fri, 1 Dec 2017 12:36:05 +0000 (UTC) Subject: Re: [PATCH] Record nested types To: Keith Seitz References: <750ffd14-bc4b-2440-e781-50b1d8c2ac89@redhat.com> <20171031190308.18094-1-keiths@redhat.com> <2798a979-42bb-2faf-c2e3-ee9078c69ebc@redhat.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <48b9640d-05be-d593-ecf0-649c785ee1e9@redhat.com> Date: Fri, 01 Dec 2017 12:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-12/txt/msg00021.txt.bz2 On 11/30/2017 11:28 PM, Keith Seitz wrote: > On 11/28/2017 06:39 AM, Pedro Alves wrote: >>>> W00t, lots of repetition. OOC, did you consider using the preprocessor >>>> to build the types? >>> >>> Preprocessor? I used the logging feature of the test script to generate the struct. [When the log is enabled, it sends the entire struct (up to the nested type limit) to gdb.log.] >> >> Ah, that's even better. Could you add a comment at the top of >> the .cc file, so that the next person that needs to change/extend >> the file doesn't try to do it manually? > > In fact, I've added a proc in the .exp file to generate the source code (sans GPL), but as I usually prefer, this only runs manually to generate the (entire) source file now. I've updated the .cc with the output of this new "make_source" procedure. [I've appended the diff between previous version of .exp below.] ... > If you'd like me to submit in full again, please let me know. Otherwise, I've appended the diff for nested-types.exp with changes necessary to get "output source file" working. I apparently broke it along the way. It would have been nice to have seen what the new .cc looks like too. But if the end result includes a comment in the .cc files mentioned that this is a generated file (maybe even include a "-*- buffer-read-only: t" marker at the top), then this is fine with me. Thanks, Pedro Alves