This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: basic block reordering + java
Jakub Jelinek writes:
> On Fri, Sep 21, 2001 at 03:30:09PM +0100, Andrew Haley wrote:
> > Anthony Green writes:
> > >
> > > Also, I find that if the last NullPointerException branch is taken,
> > > printStackTrace() will produce incorrect results. You end up seeing the
> > > function after this in place of the one calling _Jv_ThrowNullPointerException.
> > > Should we be backing up the program counter somewhere? (or emitting a NOP at
> > > the very end of each function?)
> >
> > We use backtrace() from glibc. If it's wrong, this is a glibc bug.
>
> Note that with tail call optimization some routines can be skipped in the
> backtrace. I don't know if this is the case here,
It's not exactly that: it's that throw() is a noreturn function so
there are no insns after "call throw". when throw() calls backtrace()
the return pc points after the last insn in the fuction that called
throw().
Andrew.