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: [Patch debug] Do not emit debug sections until they are required.



On 8 Nov 2010, at 16:58, Richard Henderson wrote:


On 11/06/2010 02:25 PM, IainS wrote:
Would it be sufficient (although another pass through the table :( )
to check that at least one type will be emitted before trying?

No, pubtypes is supposed to be a summary of what's in the comp unit.


If we say that type X is in there and it isn't, then the consumer
of the pubtypes info is going to get confused.  To the point where
it might have been better not to emit the data at all, which ought
to force the consumer to scan all the comp units, which is the only
way it can currently get a correct answer.


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.


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.

We could detect an 'empty' table (no unpruned types left) and elect not to emit it at all.

but maybe I'm still missing sth?

Iain

====

***

Also I note that the

 size_of_pubnames()
 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?


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