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]

[PR 13596] candidate patch


While I'm rooting around in dbxout.c, here's a fix for PR 13596.  The
problem was that the C front end no longer generates an extra BLOCK
node between a FUNCTION_DECL and the BLOCK containing the local
variable decls for the the outermost scope of the function.  But
dbxout.c still expected it.  Fixing this is easy; we tell dbxout.c
that the BLOCK at depth 0 is not to be ignored.  Languages that still
generate the extra BLOCK will not be affected, because it won't have
any symbols in it so it will be ignored.

The only tricky bit was the absence of that BLOCK also causes the
absence of NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes around the
entire function, and that in turn means there are no LBB0/LBE0 labels
to tag the N_LBRAC/N_RBRAC stabs with.  I decided not to mess with the
notes; instead I made dbxout.c aware that it had to use special labels
for the BLOCK at depth 0 (the function entrypoint label and the
"LscopeN" end-of-function label).  Breaking out dbx_output_[lr]brac is
just to make it easier to see what's going on here.

I now get correct debugging output for Michael's test case on
powerpc-darwin.  Will apply when powerpc-darwin and amd64-linux
bootstraps complete (I'm testing this along with the fix for PR
14860).

zw

Attachment: pr13596.diff
Description: Text document


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