File: rust-gdb

package info (click to toggle)
rustc 1.34.2%2Bdfsg1-1~deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,038,656 kB
  • sloc: xml: 133,832; ansic: 22,822; sh: 14,012; asm: 7,935; python: 5,292; cpp: 4,715; awk: 3,426; makefile: 2,601; yacc: 1,618; lex: 350; ruby: 68; pascal: 46
file content (18 lines) | stat: -rwxr-xr-x 727 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# Exit if anything fails
set -e

# Find out where the pretty printer Python module is
#RUSTC_SYSROOT=`rustc --print=sysroot`
#GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
# We can just hardcode this on Debian, and remove the rustc dependency
GDB_PYTHON_MODULE_DIRECTORY="/usr/share/rust-gdb"

# Run GDB with the additional arguments that load the pretty printers
# Set the environment variable `RUST_GDB` to overwrite the call to a
# different/specific command (defaults to `gdb`).
RUST_GDB="${RUST_GDB:-gdb}"
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \
  --directory="$GDB_PYTHON_MODULE_DIRECTORY" \
  -iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
  "$@"