The attached patches provide the latest version of Tobias' idea on incorporating the Java/Lisp stack traces into a common abstraction.
This patch:
1. SYS:BACKTRACE is now the primary Lisp entry point to get a backtrace, returning a list of LispStackTrace and JavaStackTrace
2. Backtraces returned from the ':bt' command are now meaningfully inspected
3. The Java function backtrace() is now called printBacktrace(), whereas backtraceAsList() is now more simply known as backtrace()
4. There is a convenience function SYS::BACKTRACE-AS-LIST that returns a list of proper Lisp lists representing the backtrace. Not sure if I want to export this symbol.
5. Fixed previous bugs which sometimes caused the Java backtrace to become corrupted (off-by-ones and something else fugly that I never totally understood, but I went back to Tobias' second version of javaStackTrace() and haven't seen anything bad since).
My only problem with my work in the current state is that if one uses SLIME to directly inspect the results of SYS:BACKTRACE (i.e. a list of LispStackTrace and JavaStackTrace objects), one gets messages that SLIME is dumping to CL:DESCRIBE because it doesn't know how to inspect the objects of this type. I thought all I had to implement to make a Java object that inherits from LispObject inspectable was to implement LispObject getParts(), but apparently there is more to it than that.