From 7b28b822f720ed13e2ac42a421a82dd618862c59 Mon Sep 17 00:00:00 2001 From: klaar36 Date: Fri, 19 May 2017 15:00:17 +0200 Subject: pintos-gdb: auto find gdb-macros path --- src/utils/pintos-gdb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/utils/pintos-gdb (limited to 'src/utils') diff --git a/src/utils/pintos-gdb b/src/utils/pintos-gdb old mode 100644 new mode 100755 index 4ef38d3..f5679d4 --- 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" "$@" -- cgit v1.2.1