about summary refs log tree commit diff stats
path: root/client.c
diff options
context:
space:
mode:
authorarg@10ksloc.org <unknown>2006-07-19 14:49:19 +0200
committerarg@10ksloc.org <unknown>2006-07-19 14:49:19 +0200
commit801d11c7e760256e816bdab83cc21d2b04955c20 (patch)
treee5cf8b0474ca8ce9056d149cba5cf3d4489b9ee2 /client.c
parent1b855fccd7287ed5c72461540d6a363d3e5b48d7 (diff)
downloaddwm-801d11c7e760256e816bdab83cc21d2b04955c20.tar.gz
alternate dwm.png
Diffstat (limited to 'client.c')
0 files changed, 0 insertions, 0 deletions
href='/ahoang/Nim/blame/bin/nim-gdb?h=devel&id=ae5094e1432cef8c32575915ae1e19deffe7df61'>^
97d37aeb0 ^







fd3583803 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27




                        

                                                         
 






                                                                                                               
 
                                                    
                                                              







                                                                      
                                                                     
#!/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)

if [[ "$(uname -s)" == "Darwin" ]]; then
  which greadlink > /dev/null || (echo "readlink not in PATH. Please install coreutils from homebrew."; exit 1)
  READLINK=greadlink
else
  which readlink > /dev/null || (echo "readlink not in PATH."; exit 1)
  READLINK=readlink
fi

# 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}"
# exec replaces the new process of bash with gdb. It is always good to
# have fewer processes.
exec "${NIM_GDB}" -eval-command="source $GDB_PYTHON_MODULE_PATH" "$@"