From 3fa9812e1d572cd06f95cec138b87d590160e4b4 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 23 Feb 2009 11:48:40 -0800 Subject: debug: Move debug_break into src/base --- src/sim/debug.cc | 14 +------------- src/sim/debug.hh | 7 +++---- src/sim/pseudo_inst.cc | 2 +- 3 files changed, 5 insertions(+), 18 deletions(-) (limited to 'src/sim') 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 -#include -#include -#include #include #include +#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 -- cgit v1.2.3