This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch debug] Do not emit debug sections until they are required.
On 11/03/2010 06:33 AM, IainS wrote:
>> This is the only hunk that concerns me. I don't believe that this
>> is valid dwarf. In particular, a non-empty pubnames implies that
>> we must have had an info section from which to pull the names.
>>
>> Did you have a test case that caused you to make this change?
>> If not, ok with gcc_assert (info_section_emitted).
>
> not a test-case -- but Java achieves it ...
> ... and with the gcc_assert (), fails to bootstrap on i686-darwin.
Ok, got it.
We generate pubtypes before -feliminate-unused-debug-types does its
thing. So we're putting stuff in pubtypes that are no longer in the
compilation unit. Which is a Bad Thing. I was right about us
emitting invalid dwarf2.
We should generate pubnames/pubtypes from the final debug_info tree,
rather than trying to emit them earlier.
r~