/*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2003-2004 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
void
debug_break()
{
+#ifndef NDEBUG
kill(getpid(), SIGTRAP);
+#else
+ cprintf("debug_break suppressed, compiled with NDEBUG\n");
+#endif
}
//
// constructor: schedule at specified time
//
DebugBreakEvent::DebugBreakEvent(EventQueue *q, Tick _when)
- : Event(q)
+ : Event(q, Debug_Break_Pri)
{
- schedule(_when, -20000);
+ setFlags(AutoDelete);
+ schedule(_when);
}
//
DebugBreakEvent::process()
{
debug_break();
- delete this;
}