Added facility for getting a stack trace.