Add nim gdb-files
This commit is contained in:
parent
44114f6506
commit
f393fff024
2 changed files with 20 additions and 0 deletions
1
gdbcommands.txt
Normal file
1
gdbcommands.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
source C:/Users/jyapa/.choosenim/toolchains/nim-#devel/tools/nim-gdb.py
|
||||||
19
nim-gdb
Normal file
19
nim-gdb
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Exit if anything fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
which nim > /dev/null || (echo "nim not in PATH"; exit 1)
|
||||||
|
which gdb > /dev/null || (echo "gdb not in PATH"; exit 1)
|
||||||
|
|
||||||
|
# Find out where the pretty printer Python module is
|
||||||
|
NIM_SYSROOT=$(dirname $(dirname $(readlink -e $(which nim))))
|
||||||
|
GDB_PYTHON_MODULE_PATH="$NIM_SYSROOT/tools/nim-gdb.py"
|
||||||
|
|
||||||
|
# Run GDB with the additional arguments that load the pretty printers
|
||||||
|
# Set the environment variable `NIM_GDB` to overwrite the call to a
|
||||||
|
# different/specific command (defaults to `gdb`).
|
||||||
|
NIM_GDB="${NIM_GDB:-gdb.exe}"
|
||||||
|
# exec replaces the new process of bash with gdb. It is always good to
|
||||||
|
# have fewer processes.
|
||||||
|
exec ${NIM_GDB} --command="gdbcommands.txt" "$@"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue