aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/pintos-gdb
diff options
context:
space:
mode:
authorklaar36 <klas.arvidsson@liu.se>2015-03-20 17:30:24 +0100
committerklaar36 <klas.arvidsson@liu.se>2015-03-20 17:30:24 +0100
commite7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad (patch)
tree4de97af7207676b69cb6a9aba8cb443cc134855d /src/utils/pintos-gdb
parentb0418a24e709f0632d2ede5b0f327c422931939b (diff)
downloadpintos-rs-e7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad.tar.gz
Initial Pintos
Diffstat (limited to 'src/utils/pintos-gdb')
-rw-r--r--src/utils/pintos-gdb20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/utils/pintos-gdb b/src/utils/pintos-gdb
new file mode 100644
index 0000000..4ef38d3
--- /dev/null
+++ b/src/utils/pintos-gdb
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+# Path to GDB macros file. Customize for your site.
+GDBMACROS=/usr/class/cs140/pintos/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