This is the mail archive of the gcc@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: Missing debug information for decls in empty blocks


On Mon, 2004-08-09 at 03:34, Nicolas Setton wrote:
> This is due to the fact that, internally, reemit_insn_block_notes only
> emits BLOCK_BEG and BLOCK_END notes only for blocks that contain active
> instructions.

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.

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.

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.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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