Wrap stack trace jumping hack into a function