summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-02-23 11:48:40 -0800
committerNathan Binkert <nate@binkert.org>2009-02-23 11:48:40 -0800
commit3fa9812e1d572cd06f95cec138b87d590160e4b4 (patch)
tree856377348451d332cc7fcba9c02cf61136270dae /src/sim
parente8c1c3e72eb01409f7ec110eee3b32c07347bf6f (diff)
downloadgem5-3fa9812e1d572cd06f95cec138b87d590160e4b4.tar.xz
debug: Move debug_break into src/base
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/debug.cc14
-rw-r--r--src/sim/debug.hh7
-rw-r--r--src/sim/pseudo_inst.cc2
3 files changed, 5 insertions, 18 deletions
diff --git a/src/sim/debug.cc b/src/sim/debug.cc
index 57ca0458c..f8a3215d0 100644
--- a/src/sim/debug.cc
+++ b/src/sim/debug.cc
@@ -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
diff --git a/src/sim/debug.hh b/src/sim/debug.hh
index 937864e69..7dafb8394 100644
--- a/src/sim/debug.hh
+++ b/src/sim/debug.hh
@@ -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__
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index f1cf2835d..00d0dbe7a 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -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