Missing debug information for decls in empty blocks

Nicolas Setton setton@act-europe.fr
Wed Aug 11 08:43:00 GMT 2004


Hello,

> It seems like the problem actually occurs earlier, in
> insn_locators_initialize.  This is where we strip out the
> NOTE_INSN_BLOCK_{BEG,END} notes, and set the INSN_LOCATOR insn fields. 
> If a block has no active insns, then the block effectively gets lost at
> this point.

Yes, absolutely.

> Trying to add this info to line number notes also sounds like it might
> work.  I'd think that you would have to modify both
> insn_locators_initialize and reemit_insn_block_notes to get the desired
> effect.  The first one to save block info into line number notes, and
> the second one to read the info out of line number notes.

Yes, I have done exactly what you describe, and it seems to work fine.

> If this doesn't work, we might have to insert a dummy insn to represent
> the block, so it doesn't get lost.
> 
> If you want to try to write a patch to solve this, that is fine.  Or you
> could try filing a bugzilla bug report to document this.

I have written a patch, and will submit it.

Thanks again for looking at this !

Nico



More information about the Gcc mailing list