Re: gdb can't handle a DIE with both sibling and children

Daniel Jacobowitz
2003-07-31T21:01:46Z

On Thu, Jul 31, 2003 at 01:58:36PM -0700, H. J. Lu wrote:
> On Thu, Jul 31, 2003 at 04:29:35PM -0400, Daniel Jacobowitz wrote:
> > On Thu, Jul 31, 2003 at 01:22:29PM -0700, H. J. Lu wrote:
> > > On Thu, Jul 31, 2003 at 04:02:15PM -0400, Daniel Jacobowitz wrote:
> > > > >
> > > > > I don't know for sure how DW_TAG_entry_point works. It seems to me
> > > > > that DW_TAG_entry_point should inherit DW_AT_accessibility and
> > > > > DW_AT_high_pc from its parent.
> > > >
> > > > Certainly not high_pc. Its _bounds_ are the bounds of its parent; the
> > > > entry point is only specific PC that gets jumped to.
> > >
> > > The entry point is DW_AT_low_pc. From what I can see, its DW_AT_high_pc
> > > should be the same as its parent. See
> > >
> > > http://www-sld.slac.stanford.edu/HELP/FORTRAN/STATEMENTS/ENTRY
> >
> > Think about this for a moment.
> >
> > DW_AT_low_pc represents a PC - an entry point.
> >
> > DW_AT_low_pc + DW_AT_high_pc represents a range - a whole subroutine.
> >
> > The bounds of the entry point are the bounds of the entire function, or
> > none at all. Inheriting DW_AT_high_pc makes no sense. In Fortran,
> > they represent a low_pc->high_pc range, but there are a number of other
> > useful meanings for it.
> >
>
> What should high_pc of an entry point be if it is not specified?

The bounds of the entry point are the bounds of the containing
function.

The entry point of the entry point is its DW_AT_low_pc.

They're not related...

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer