This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Record nested types
- From: Pedro Alves <palves at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 1 Dec 2017 12:36:05 +0000
- Subject: Re: [PATCH] Record nested types
- Authentication-results: sourceware.org; auth=none
- References: <750ffd14-bc4b-2440-e781-50b1d8c2ac89@redhat.com> <20171031190308.18094-1-keiths@redhat.com> <2798a979-42bb-2faf-c2e3-ee9078c69ebc@redhat.com> <e8c180d6-5340-e3b8-5876-aa5034ecb288@redhat.com>
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