This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Record nested types


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]