projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfd2e96
)
Utility for invoking the proper GDB and loading Pintos macros.
author
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 7 Apr 2006 18:30:09 +0000
(18:30 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 7 Apr 2006 18:30:09 +0000
(18:30 +0000)
src/utils/pintos-gdb
[new file with mode: 0755]
patch
|
blob
diff --git a/src/utils/pintos-gdb
b/src/utils/pintos-gdb
new file mode 100755
(executable)
index 0000000..
c986b40
--- /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 -e "$GDBMACROS"; then
+ exec $GDB -x "$GDBMACROS" "$@"
+else
+ echo "*** $GDBMACROS does not exist ***"
+ echo "*** Pintos GDB macros will not be available ***"
+ exec $GDB "$@"
+fi