From 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 27 Mar 2012 11:51:08 +0200 Subject: reorganize file structure to match the upstream requirements --- utils/pintos-gdb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 utils/pintos-gdb (limited to 'utils/pintos-gdb') diff --git a/utils/pintos-gdb b/utils/pintos-gdb new file mode 100755 index 0000000..9c9555b --- /dev/null +++ b/utils/pintos-gdb @@ -0,0 +1,21 @@ +#! /bin/sh + +# Path to GDB macros file. Customize for your site. +PINTOS_SRC="$(dirname $(dirname $(which pintos-gdb)))" +GDBMACROS="${PINTOS_SRC}/misc/gdb-macros" + +# Choose correct GDB. +if command -v i386-elf-gdb >/dev/null 2>&1; then + GDB=i386-elf-gdb +else + GDB=gdb +fi + +# Run GDB. +if test -f "$GDBMACROS"; then + exec $GDB -x "$GDBMACROS" "$@" +else + echo "*** $GDBMACROS does not exist ***" + echo "*** Pintos GDB macros will not be available ***" + exec $GDB "$@" +fi -- cgit v1.2.3