summaryrefslogtreecommitdiffstats
path: root/pintos-progos/utils/pintos-gdb
diff options
context:
space:
mode:
Diffstat (limited to 'pintos-progos/utils/pintos-gdb')
-rwxr-xr-xpintos-progos/utils/pintos-gdb21
1 files changed, 21 insertions, 0 deletions
diff --git a/pintos-progos/utils/pintos-gdb b/pintos-progos/utils/pintos-gdb
new file mode 100755
index 0000000..9c9555b
--- /dev/null
+++ b/pintos-progos/utils/pintos-gdb
@@ -0,0 +1,21 @@
1#! /bin/sh
2
3# Path to GDB macros file. Customize for your site.
4PINTOS_SRC="$(dirname $(dirname $(which pintos-gdb)))"
5GDBMACROS="${PINTOS_SRC}/misc/gdb-macros"
6
7# Choose correct GDB.
8if command -v i386-elf-gdb >/dev/null 2>&1; then
9 GDB=i386-elf-gdb
10else
11 GDB=gdb
12fi
13
14# Run GDB.
15if test -f "$GDBMACROS"; then
16 exec $GDB -x "$GDBMACROS" "$@"
17else
18 echo "*** $GDBMACROS does not exist ***"
19 echo "*** Pintos GDB macros will not be available ***"
20 exec $GDB "$@"
21fi