debug: Move debug_break into src/base
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -28,16 +28,15 @@
|
||||
* Authors: Nathan Binkert
|
||||
*/
|
||||
|
||||
#ifndef __DEBUG_HH__
|
||||
#define __DEBUG_HH__
|
||||
#ifndef __SIM_DEBUG_HH__
|
||||
#define __SIM_DEBUG_HH__
|
||||
|
||||
#include "sim/host.hh"
|
||||
|
||||
void schedBreakCycle(Tick when);
|
||||
void debug_break();
|
||||
|
||||
int getRemoteGDBPort();
|
||||
// Remote gdb base port. 0 disables remote gdb.
|
||||
void setRemoteGDBPort(int port);
|
||||
|
||||
#endif // __DEBUG_HH__
|
||||
#endif // __SIM_DEBUG_HH__
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "arch/kernel_stats.hh"
|
||||
#include "arch/vtophys.hh"
|
||||
#include "base/annotate.hh"
|
||||
#include "base/debug.hh"
|
||||
#include "cpu/base.hh"
|
||||
#include "cpu/thread_context.hh"
|
||||
#include "cpu/quiesce_event.hh"
|
||||
@@ -49,7 +50,6 @@
|
||||
#include "sim/stat_control.hh"
|
||||
#include "sim/stats.hh"
|
||||
#include "sim/system.hh"
|
||||
#include "sim/debug.hh"
|
||||
#if FULL_SYSTEM
|
||||
#include "sim/vptr.hh"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user