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



--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-01 
10:58:06 UTC ---

If we arrange for "minimal" support, thus output BLOCK_ABSTRACT_ORIGIN/LOCATION

only if it is a FUNCTION_DECL (thus, try to handle 1-level inlining only) then

we run into the issue that if the function isn't materialized in the same

LTRANS unit then it's DECL_INITIAL is NULL_TREE and thus dwarf2out_decl

doesn't do anything and we end up with



 <2><166>: Abbrev Number: 5 (DW_TAG_inlined_subroutine)

    <16b>   DW_AT_low_pc      : 0x40058c        

    <173>   DW_AT_high_pc     : 0xa     

    <17b>   DW_AT_call_file   : 1       

    <17c>   DW_AT_call_line   : 6       



We can of course "fix" dwarf2out.c to not look at DECL_INITIAL (which it

does as a "fix" for the C frontends extern inline functions ...) but

at for example DECL_ABSTRACT (when we are called from inline generation

and nothing output the abstract function DIE already).  Then we finally

get the desired



 <2><166>: Abbrev Number: 5 (DW_TAG_inlined_subroutine)

    <167>   DW_AT_abstract_origin: <0x190>      

    <16b>   DW_AT_low_pc      : 0x40058c        

    <173>   DW_AT_high_pc     : 0xa     

    <17b>   DW_AT_call_file   : 1       

    <17c>   DW_AT_call_line   : 6       



with a proper abstract origin and we can break on the inlined function.

Reply via email to