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 v2 06/11] Add a more general version of lookup_struct_elt_type.


On 3/7/19 4:32 PM, Pedro Alves wrote:
> On 03/08/2019 12:04 AM, John Baldwin wrote:
>> On 3/7/19 7:53 AM, Simon Marchi wrote:
>>> Not really a big deal, but I find it a bit overkill to define a type 
>>> just for this, I would have probably just returned the the offset as an 
>>> output parameter.  But maybe this way is better, in that if we want to 
>>> add something to the return type, we don't have to update the callers.
>>
>> Honestly, I just modeled this after the similar code in the Linux
>> kernel thread patches.  Using a reference parameter for the offset
>> would be fine and I don't mind making that change.  I don't think that
>> we are going to add more things to that structure in the future.  The
>> field generally has everything else you want to know other than the
>> offset.
>>
> 
> Note that you can keep the struct with just the data fields
> and no ctor boilerplate if you use brace initialization.

Thanks, I've made this change and also fixed the missing space.

-- 
John Baldwin


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