debug.cc (9983:2cce74fe359e) debug.cc (10453:d0365cc3d05f)
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;

--- 15 unchanged lines hidden (view full) ---

24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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
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;

--- 15 unchanged lines hidden (view full) ---

24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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
34#include <string>
35#include <vector>
36
37#include "base/debug.hh"
38#include "sim/debug.hh"
39#include "sim/eventq_impl.hh"
40#include "sim/global_event.hh"
41#include "sim/sim_events.hh"

--- 61 unchanged lines hidden (view full) ---

103void
104eventqDump()
105{
106 for (uint32_t i = 0; i < numMainEventQueues; ++i) {
107 mainEventQueue[i]->dump();
108 }
109}
110
32#include <string>
33#include <vector>
34
35#include "base/debug.hh"
36#include "sim/debug.hh"
37#include "sim/eventq_impl.hh"
38#include "sim/global_event.hh"
39#include "sim/sim_events.hh"

--- 61 unchanged lines hidden (view full) ---

101void
102eventqDump()
103{
104 for (uint32_t i = 0; i < numMainEventQueues; ++i) {
105 mainEventQueue[i]->dump();
106 }
107}
108
111void
112py_interact()
113{
114 PyObject *globals;
115 PyObject *locals;
116
117 globals = PyEval_GetGlobals();
118 Py_INCREF(globals);
119 locals = PyDict_New();
120 PyRun_String("import code", Py_file_input, globals, locals);
121 PyRun_String("code.interact(local=globals())", Py_file_input,
122 globals, locals);
123 Py_DECREF(globals);
124 Py_DECREF(locals);
125}
126
127int remote_gdb_base_port = 7000;
128
129int
130getRemoteGDBPort()
131{
132 return remote_gdb_base_port;
133}
134
135// Set remote GDB base port. 0 means disable remote GDB.
136// Callable from python.
137void
138setRemoteGDBPort(int port)
139{
140 remote_gdb_base_port = port;
141}
142
109int remote_gdb_base_port = 7000;
110
111int
112getRemoteGDBPort()
113{
114 return remote_gdb_base_port;
115}
116
117// Set remote GDB base port. 0 means disable remote GDB.
118// Callable from python.
119void
120setRemoteGDBPort(int port)
121{
122 remote_gdb_base_port = port;
123}
124