# Tuesday, February 22, 2005
« Eclipse is Evil | Main | New Snapshot »
Stack Traces

Corey comments on the previous entry:

While I agree that the Eclipse code is performing some nasty checks there I don't think I agree with the implication that the stacktrace created by the VM should change based on whether the method was inlined or not. I'm not sure what is mandated by the JVM spec but the stacktrace isn't going to be very useful for a developer debugging his program if the stacktrace changes depending on whether something got inlined or optimized away by the VM...

Here's what the Javadocs for Throwable.getStackTrace() say:

Some virtual machines may, under some circumstances, omit one or more stack frames from the stack trace. In the extreme case, a virtual machine that has no stack trace information concerning this throwable is permitted to return a zero-length array from this method.

On JDK 1.1 it was quite common to miss stack frames in a stack trace, but HotSpot is actually very good at creating a full stack trace even when it inlines methods. The CLR could certainly do better in this regard.

Bottom line is that the Eclipse code is very JVM specific and as far as I can tell it doesn't even serve any useful purpose.

Tuesday, February 22, 2005 9:20:05 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [2] Tracked by:
"diet pills fast weight loss" (diet pills fast weight loss) [Trackback]

Thursday, February 24, 2005 2:51:59 PM (W. Europe Standard Time, UTC+01:00)
Thats is prehaps the best comment I have ever seen written about eclipse :)
Sunday, February 27, 2005 3:36:46 PM (W. Europe Standard Time, UTC+01:00)
I saw the code you are talking about on project-mono's blog and such code is not just ugly its simply WRONG since its not compatible what Javadoc says.

There are message-strings and (even better) own exception for this task so why try to fix some broken code - let it break and send a description to the mailing list that this code is just awful or fill a bug-report.

I think its a bit funny - IBM always claims Eclipse is coded so wonderful and well and of course its based 100% on extreme programming but if I see such codelines I see extreme programming from a different point of view ;-)

lg Cemens
Clemens Eisserer
Comments are closed.