X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flib%2Fdebug.c;h=4f0f5f303cf933dab61c1b1e6f723d7ed7b8bb6b;hb=67a51d5e82939a9708ebe57b2c6a5b8cd05ad96d;hp=7d520638c8cd9a9e8e60a3874b5ce5ae1dee7845;hpb=b9f0f2802c11a0ae6fa39fa846c37df25731ad3d;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