diff options
| author | klaar36 <klas.arvidsson@liu.se> | 2017-05-19 15:00:17 +0200 |
|---|---|---|
| committer | klaar36 <klas.arvidsson@liu.se> | 2017-05-19 15:00:17 +0200 |
| commit | 7b28b822f720ed13e2ac42a421a82dd618862c59 (patch) | |
| tree | 23ff6a72eaeac1ea6d0be74abc7d4ee768a5aba3 /src | |
| parent | e91e5351f64f5d0503c7971b44f3aeec704a407c (diff) | |
| download | pintos-rs-7b28b822f720ed13e2ac42a421a82dd618862c59.tar.gz | |
pintos-gdb: auto find gdb-macros path
Diffstat (limited to 'src')
| -rwxr-xr-x[-rw-r--r--] | src/utils/pintos-gdb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/utils/pintos-gdb b/src/utils/pintos-gdb index 4ef38d3..f5679d4 100644..100755 --- a/src/utils/pintos-gdb +++ b/src/utils/pintos-gdb @@ -1,7 +1,7 @@ -#! /bin/sh +#! /bin/bash - # Path to GDB macros file. Customize for your site. -GDBMACROS=/usr/class/cs140/pintos/pintos/src/misc/gdb-macros +GDBMACROS=$(dirname $(which pintos))/gdb-macros # Choose correct GDB. if command -v i386-elf-gdb >/dev/null 2>&1; then @@ -10,6 +10,10 @@ else GDB=gdb fi +if command -v mapsocket >/dev/null 2>&1; then + GDB="mapsocket $GDB" +fi + # Run GDB. if test -f "$GDBMACROS"; then exec $GDB -x "$GDBMACROS" "$@" |
