This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [Google 4.7 Split Dwarf] Use .debug_str for some strings. (issue7241067)


On Mon, Feb 4, 2013 at 11:56 AM, Cary Coutant <ccoutant@google.com> wrote:
>> @@ -22385,21 +22448,21 @@
>>  static void
>>  output_indirect_strings (void)
>>  {
>> +  switch_to_section (debug_str_section);
>>    if (!dwarf_split_debug_info)
>> -    {
>> -      switch_to_section (debug_str_section);
>> -      htab_traverse (debug_str_hash, output_indirect_string, NULL);
>> -    }
>> +    htab_traverse (debug_str_hash, output_indirect_string, NULL);
>>    else
>>      {
>>        unsigned int offset = 0;
>>        unsigned int cur_idx = 0;
>>
>> +      htab_traverse (skeleton_debug_str_hash, output_indirect_string, NULL);
>> +
>>        switch_to_section (debug_str_offsets_section);
>>        htab_traverse_noresize (debug_str_hash,
>>                                output_index_string_offset,
>>                                &offset);
>> -      switch_to_section (debug_str_section);
>> +      switch_to_section (debug_str_dwo_section);
>>        htab_traverse_noresize (debug_str_hash,
>>                                output_index_string,
>>                                &cur_idx);
>
> Doesn't this routine now need to check to see if debug_str_hash and
> skeleton_debug_str_hash are non-NULL individually? It gets called if
> either is non-NULL, but what will happen if only one is NULL?

Ahh, good catch. Fixed as attached.

Sterling

Attachment: patch.diff
Description: Binary data


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