summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
Diffstat (limited to 'kern')
-rw-r--r--kern/assert.h2
-rw-r--r--kern/debug.c4
-rw-r--r--kern/debug.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/kern/assert.h b/kern/assert.h
index 228f91c..2829728 100644
--- a/kern/assert.h
+++ b/kern/assert.h
@@ -36,7 +36,7 @@
#endif
#if MACH_ASSERT
-extern void Assert(char *exp, char *filename, int line);
+extern void Assert(char *exp, char *filename, int line) __attribute__ ((noreturn));
#define assert(ex) \
MACRO_BEGIN \
diff --git a/kern/debug.c b/kern/debug.c
index f8774fc..c6e0257 100644
--- a/kern/debug.c
+++ b/kern/debug.c
@@ -34,7 +34,7 @@
#include <kern/debug.h>
extern void cnputc();
-void Debugger();
+void Debugger() __attribute__ ((noreturn));
#if MACH_KDB
extern int db_breakpoints_inserted;
@@ -100,6 +100,8 @@ void Debugger(message)
#ifdef i386
asm("int3");
#endif
+
+ panic("Debugger returned!");
}
/* Be prepared to panic anytime,
diff --git a/kern/debug.h b/kern/debug.h
index 28e7b73..62be7fc 100644
--- a/kern/debug.h
+++ b/kern/debug.h
@@ -58,6 +58,6 @@
#endif /* NDEBUG */
extern void panic_init();
-extern void panic (const char *s, ...);
+extern void panic (const char *s, ...) __attribute__ ((noreturn));
#endif /* _mach_debug__debug_ */