scripts/globals: add backtrace function.