made debugging crio LOG(FATAL)s easier

git-svn-id: https://robotics.mvla.net/svn/frc971/2013/trunk/src@4288 f308d9b7-e957-4cde-b6ac-9a88185e7312
diff --git a/aos/common/die.cc b/aos/common/die.cc
index 00a86bb..203c654 100644
--- a/aos/common/die.cc
+++ b/aos/common/die.cc
@@ -10,6 +10,8 @@
 #include <taskLib.h>
 // Have to re-declare it with __attribute__((noreturn)).
 extern "C" void abort() __attribute__((noreturn));
+#include <usrLib.h>
+#include <dbgLib.h>
 #endif
 
 #include <string>
@@ -72,6 +74,15 @@
     }
   }
 
+#ifdef __VXWORKS__
+  printf("I am 0x%x suspending for debugging purposes.\n", taskIdSelf());
+  printf("\t`tt 0x%x` will give you a stack trace.\n", taskIdSelf());
+  fputs("\t`lkAddr` will reverse lookup a symbol for you.\n", stdout);
+  fputs("\t`dbgHelp` and `help` have some useful commands in them.\n", stdout);
+  taskSuspend(0);
+  printf("You weren't supposed to resume 0x%x!!. Going to really die now.\n",
+         taskIdSelf());
+#endif
   abort();
 }