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]

Re: [RFC] PR 12389


On Tue, Oct 21, 2003 at 10:38:11AM +0200, Jan Hubicka wrote:
> My understanding is that the abstract DIE is usefull only when
> referenced by something and we reference it only when procue debug
> output for inline function.  Jason also seemed to agree with idea that
> DW_INLI_declared_not_inlined is usefull unless you use
> -feliminate-dwarf2-dups.
> Now it is not clear for me at all how it is suefull there.  If we emit
> DW_INL_declared_not_inlined it will surely not be shared with any other
> compilation unit where the function really has been inlined.
> 
> Does this seem to make sense?

I understand your reasoning, but exactly because the outcome
is that certain defined (by the DWARF standard) values will
never be used - I get the feeling that we are not understanding
the intend of that standard.  In this case I could imagine that
a DW_INLI_declared_not_inlined is meant to signify that a
function is declared inline.  If you short circuit the abstract
instance tree and the (only) refering concrete instance tree,
then you through away the information that a function was
_declared_ inline.  Doing so would decrease the total size of
the debug information of course - which is the reason you do
so - but following that reasoning you might as well throw away
more debug information :/.

In the 'industry review draft' of 1993 (http://www.eagercon.com/dwarf/dwarf-2.0.0.pdf)
I find:

3.3.8 Inline Subroutines

A declaration or a definition of an inlinable subroutine is represented by a debugging information
entry with the tag DW_TAG_subprogram. The entry for a subroutine that is explicitly declared to be
                                      -----------------------------------=========================
available for inline expansion or that was expanded inline implicitly by the compiler has a
==============================                                                        =====
DW_AT_inline attribute whose value is a constant.
======================--------------------------

This led me to conclude that just declaring a function inline is enough to warrant
the abstract DIE (with the DW_AT_inline attribute).

-- 
Carlo Wood <carlo@alinoe.com>


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