Skip to content

Instantly share code, notes, and snippets.

@vadimkantorov
Last active September 25, 2025 23:06
Show Gist options
  • Select an option

  • Save vadimkantorov/cad0c8abba3d9a28a48710968f261d77 to your computer and use it in GitHub Desktop.

Select an option

Save vadimkantorov/cad0c8abba3d9a28a48710968f261d77 to your computer and use it in GitHub Desktop.
A Bash alias to run a Python script under gdb
# Usage:
# gdbpython script.py my_script_arguments
# gdbbacktrace ./my_program arg1 arg2
alias gdbpython="gdb -ex run --args python"
alias gdbbacktrace="gdb -batch -ex run -ex bt --args"
alias gdbbacktracequit="gdb -ex 'set pagination off' -ex 'set confirm off' -iex 'set debuginfod enabled on' -ex run -ex 'thread apply all bt' -ex quit --args"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment