X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flib%2Fdebug.c;h=4f0f5f303cf933dab61c1b1e6f723d7ed7b8bb6b;hb=eb5ba83c314e0074e2b280516e3e30b8626c638f;hp=7d520638c8cd9a9e8e60a3874b5ce5ae1dee7845;hpb=f6ed960fb20e2dc6607e6adf11461bf13fce5834;p=pintos-anon diff --git a/src/lib/debug.c b/src/lib/debug.c index 7d52063..4f0f5f3 100644 --- a/src/lib/debug.c +++ b/src/lib/debug.c @@ -5,6 +5,7 @@ #include #include #ifdef KERNEL +#include "threads/init.h" #include "threads/interrupt.h" #include "devices/serial.h" #else @@ -87,9 +88,15 @@ debug_panic (const char *file, int line, const char *function, debug_backtrace (); + printf ("The `backtrace' program can make call stacks useful.\n" + "Read \"Backtraces\" in the \"Debugging Tools\" chapter\n" + "of the Pintos documentation for more information.\n"); + #ifdef KERNEL serial_flush (); - power_off (); + if (power_off_when_done) + power_off (); + for (;;); #else exit (1); #endif