Atlas - gdbcmds.txt
Home / ext / SDL / test / unix Lines: 3 | Size: 830 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1# Script to run a headless gdb printing a stacktrace on a fatal signal 2# Use it as: `gdb -batch -nx -x gdbcmds.txt --args $PROGRAM_AND_ARGS` 3# Configure CMake with -DSDLTEST_GDB=ON to use with within CTest. 4 5set pagination off 6set confirm off 7set verbose off 8 9# Only stop on real crash signals 10handle SIGSEGV stop print nopass 11handle SIGABRT stop print nopass 12handle SIGILL stop print nopass 13handle SIGFPE stop print nopass 14handle SIGBUS stop print nopass 15 16# Ignore SIGPIPE and SIGTERM signals 17# (SIGTERM is used by testthread) 18handle SIGPIPE nostop noprint pass 19handle SIGTERM nostop noprint pass 20 21define hook-stop 22 if !$_isvoid($_siginfo) 23 printf "\n=== Crash detected (signal %d) ===\n", $_siginfo.si_signo 24 bt full 25 quit 1 26 end 27end 28 29run 30 31# Normal exit path 32if !$_isvoid($_exitcode) 33 quit $_exitcode 34end 35 36quit 0 37[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.