debug: Move debug_break into src/base

This commit is contained in:
Nathan Binkert
2009-02-23 11:48:40 -08:00
parent e8c1c3e72e
commit 3fa9812e1d
10 changed files with 91 additions and 22 deletions

View File

@@ -30,29 +30,17 @@
*/
#include <Python.h>
#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <string>
#include <vector>
#include "base/debug.hh"
#include "sim/debug.hh"
#include "sim/eventq.hh"
#include "sim/sim_events.hh"
using namespace std;
void
debug_break()
{
#ifndef NDEBUG
kill(getpid(), SIGTRAP);
#else
cprintf("debug_break suppressed, compiled with NDEBUG\n");
#endif
}
//
// Debug event: place a breakpoint on the process function and
// schedule the event to break at a particular cycle