This is the mail archive of the
mailing list for the GCC project.
Re: [Patch debug] Do not emit debug sections until they are required.
On 11/08/2010 09:19 AM, IainS wrote:
> If the current code is working correctly (question about checking
> p->die->die_offset != 0 as the condition ***) ... then we should only
> emit un-pruned types.
Hmm. It would seem that I didn't follow the path far enough to see
us skipping eliminated pubtypes during output. I was still focused
on the existence of the pubtypes section.
> Thus, we emit an empty pubtypes table at present if all the types
> have been pruned - I think that case is producing the invalid debug.
Yes. In particular your line about using 0 instead of a real pointer
to the debug_info section. There is no "null pointer". If the debug_info
section doesn't exist, then the pub* sections can't exist either.
> We could detect an 'empty' table (no unpruned types left) and elect not to emit it at all.
That sounds plausible.
> Also I note that the
> output_pubnames ()
> routines check p->die->die_offset != 0 as the condition.
> I wonder if that is not supposed to be p->die->die_mark?
No, the marks are unset after processing.