debug.cc (5619:4b50a0d875da) | debug.cc (5882:5a047c3f3795) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Nathan Binkert 29 * Steve Reinhardt 30 */ 31 32#include <Python.h> | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Nathan Binkert 29 * Steve Reinhardt 30 */ 31 32#include <Python.h> |
33#include <sys/types.h> 34#include <signal.h> 35#include <unistd.h> | |
36 37#include <string> 38#include <vector> 39 | 33 34#include <string> 35#include <vector> 36 |
37#include "base/debug.hh" |
|
40#include "sim/debug.hh" 41#include "sim/eventq.hh" 42#include "sim/sim_events.hh" 43 44using namespace std; 45 | 38#include "sim/debug.hh" 39#include "sim/eventq.hh" 40#include "sim/sim_events.hh" 41 42using namespace std; 43 |
46void 47debug_break() 48{ 49#ifndef NDEBUG 50 kill(getpid(), SIGTRAP); 51#else 52 cprintf("debug_break suppressed, compiled with NDEBUG\n"); 53#endif 54} 55 | |
56// 57// Debug event: place a breakpoint on the process function and 58// schedule the event to break at a particular cycle 59// 60struct DebugBreakEvent : public Event 61{ 62 DebugBreakEvent(); 63 void process(); // process event --- 78 unchanged lines hidden --- | 44// 45// Debug event: place a breakpoint on the process function and 46// schedule the event to break at a particular cycle 47// 48struct DebugBreakEvent : public Event 49{ 50 DebugBreakEvent(); 51 void process(); // process event --- 78 unchanged lines hidden --- |