debug.cc (5606:6da7a58b0bc8) debug.cc (5619:4b50a0d875da)
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>
32#include <sys/types.h>
33#include <signal.h>
34#include <unistd.h>
35
36#include <string>
37#include <vector>
38
39#include "sim/debug.hh"

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

101
102void
103eventqDump()
104{
105 mainEventQueue.dump();
106 warn("need to dump all queues");
107}
108
33#include <sys/types.h>
34#include <signal.h>
35#include <unistd.h>
36
37#include <string>
38#include <vector>
39
40#include "sim/debug.hh"

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

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