Marking the end of a function

Andrew Haley aph@redhat.com
Thu Sep 26 01:47:00 GMT 2002


Richard Henderson writes:
 > On Wed, Sep 25, 2002 at 06:42:45PM +0100, Andrew Haley wrote:
 > > In a way, gcc already outputs this info, but only as part of the
 > > debugging information.
 > 
 > It's in the EH information as well:
 > 
 >         .4byte  $LSFDE1-__FRAME_BEGIN__  # FDE CIE offset
 >         .8byte  $LFB1    # FDE initial location
 >         .8byte  $LFE1-$LFB1      # FDE address range

Okay, yes.  I suppose I could call _Unwind_Find_FDE and then next_fde
a couple of times to return the length info.
 
However, this makes libgcj dependent on DWARF unwind info, which it
isn't at the moment.  Java's reflection information is independent of
debugging and unwinder info, and in many cases duplicates information,
but that's quite deliberate.

FYI, what I'm trying to do is add to the reflection data for every
method a new field that is the extent of that method.  However, the
reflection data for a particular class isn't necessarily in the same
assembly source file as the code, so sometimes end labels need to have
external visibility.

BTW, if it's thought that all these end labels will excessively bloat
object files for no good reason I will add a flag to the function decl
to indicate whether the end marker is really needed.

Andrew.



More information about the Gcc-patches mailing list