[Google 4.7 Split Dwarf] Use .debug_str for some strings. (issue7241067)

Sterling Augustine saugustine@google.com
Mon Feb 4 21:22:00 GMT 2013


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 11088 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130204/e860bddb/attachment.obj>


More information about the Gcc-patches mailing list