This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: Stack traces from reflection metadata


Bryce McKinlay writes:
 > 
 > On mainline you'll notice that Throwable now mostly implements the JDK 
 > 1.4 API. The main bit that isn't updated is printStackTrace(), which 
 > should call getStackTrace() and then print the stack trace based on the 
 > contents of the returned StackTraceElement array. So, ideally this would 
 > be implemented as a "back end" for getStackTrace(). Another back end 
 > would be the existing addr2line lookup support, and yet another would be 
 > the hypothetical one that uses dwarf2 debug info.

We have to be very careful not to break anything here.

Some desirable features of what we have at the moment:

1.  Creating an instance of Throwable is fast.  It's good that we
    don't do any expensive searches when fillInStackTrace() is called.

2.  We display the whole stack, native methods and all.

Some undesirable features of what we have at the moment:

1.  No information about interpreted classes.  I have a scheme to fix
    this that I'll do as soon as I get a round tuit.

I like the idea of multiple back ends.  This means we could keep the
good features of the existing printStackTrace() where it's
advantageous.

Andrew.


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