------- Comment #4 from wilson at gcc dot gnu dot org  2006-02-22 00:28 -------
The debug info looks OK to me, though it is more verbose than it needs to be.

I think you may be reading the debug info wrong.  The entry you are looking at
is the abstract origin for pageout.  If you take the offset of this entry, 9aee
in your case, and search for that, you will find the real debug info for
pageout, which has an abstract origin attribute pointing at the 9aee entry.  I
get slightly different addresses, but here is what I get
        .uleb128 0x4e   # (DIE (0x9af3) DW_TAG_subprogram)
        .long   0x9bd6  # DW_AT_sibling
        .long   .LASF1677       # DW_AT_name: "pageout"
        .byte   0x1     # DW_AT_decl_file
        .value  0x13e   # DW_AT_decl_line
        .byte   0x1     # DW_AT_prototyped
        .long   0x8df5  # DW_AT_type
        .byte   0x1     # DW_AT_inline
        ...
        .uleb128 0x3e   # (DIE (0x9bd6) DW_TAG_subprogram)
        .long   0x9d39  # DW_AT_sibling
        .long   0x9af3  # DW_AT_abstract_origin
        .long   .LFB813 # DW_AT_low_pc
        .long   .LFE813 # DW_AT_high_pc
        .long   .LLST34 # DW_AT_frame_base
So the debug info is correct, in the sense it correctly describes the program.

The debug is more verbose than it should be though, since there is no need for
the abstract origin if the function was never inlined.  This is due to problems
with cgraph.  Now that cgraph controls when and how we emit code for functions,
we really need to move the debug output calls into cgraph, so that functions
are finalized by cgraph before we try to emit debug info for them.  There are a
few other bugzilla bug reports concerning the same issue, though it may not be
easy to find them.  It is probably also not easy to fix this.

See cgraph_function_possibly_inlined_p.

What is the real bug that you are trying to report here?  Are you complaining
because the debug info is unnecessarily verbose?  Do you have a debugger that
doesn't handle this debug info correctly?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26364

Reply via email to