Getting a stack trace for a given function