Re: [RFA 04/42] Move last_source file to buildsym_compunit

Tom Tromey
2018-07-08T16:33:13Z

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

Simon> On 2018-05-23 12:58 AM, Tom Tromey wrote:
>> @@ -140,6 +147,12 @@ struct buildsym_compunit
>> /* The subfile of the main source file. */
>> struct subfile *main_subfile = nullptr;
>>
>> + /* Name of source file whose symbol data we are now processing. This
>> + comes from a symbol of type N_SO for stabs. For Dwarf it comes

Simon> I think it's spelled DWARF (all caps)?

Yeah, I just moved the old comment; but I've updated it now.

>> + from the DW_AT_name attribute of a DW_TAG_compile_unit DIE. */
>> +
>> + gdb::unique_xmalloc_ptr<char> m_last_source_file;

Simon> Nit: remove the empty line between the comment and the field.

Done.

Simon> Should this new field be private?

All the data members are private by the end of the series, but I didn't
generally try to do that at each step along the way. This is one of
those compromises I mentioned in the cover letter -- where a bigger
reordering of the series might have yielded a prettier series, but
didn't seem worth the effort.

Tom