>> + /* If we're putting types in their own .debug_types sections,
>> + the .debug_pubtypes table will still point to the compile
>> + unit (not the type unit), so we want to use the offset of
>> + the skeleton DIE (if there is one). */
>> + if (pub->die->comdat_type_p && names == pubtype_table)
>>
>> + {
>> + comdat_type_node_ref type_node =
>> pub->die->die_id.die_type_node;
>> +
>> + if (type_node != NULL && type_node->skeleton_die != NULL)
>> + die_offset = type_node->skeleton_die->die_offset;
>> + }
>
>
> I think we had agreed that if there is no skeleton, we should use an offset
> of 0.
You're right, I forgot to handle that case. How's this look?
if (type_node != NULL)
die_offset = (type_node->skeleton_die != NULL
? type_node->skeleton_die->die_offset
: 0);
Is that OK if it passes regression tests?
-cary