diff options
author | Nathan Binkert <nate@binkert.org> | 2008-08-03 18:19:55 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-08-03 18:19:55 -0700 |
commit | 50ef39af82413ef463609f24173b22af13fad268 (patch) | |
tree | 44fb10aeaf17c5055c2ae315f5bc52e25180a3d3 /src/cpu/nativetrace.cc | |
parent | ede89c2d541051c2ed647e2967712e10b3c0fab0 (diff) | |
download | gem5-50ef39af82413ef463609f24173b22af13fad268.tar.xz |
sockets: Add a function to disable all listening sockets.
When invoking several copies of m5 on the same machine at the same
time, there can be a race for TCP ports for the terminal connections
or remote gdb. Expose a function to disable those ports, and have the
regression scripts disable them. There are some SimObjects that have
no other function than to be used with ports (NativeTrace and
EtherTap), so they will panic if the ports are disabled.
Diffstat (limited to 'src/cpu/nativetrace.cc')
-rw-r--r-- | src/cpu/nativetrace.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cpu/nativetrace.cc b/src/cpu/nativetrace.cc index 7152602fe..c23a9e4ad 100644 --- a/src/cpu/nativetrace.cc +++ b/src/cpu/nativetrace.cc @@ -50,8 +50,12 @@ using namespace TheISA; namespace Trace { -NativeTrace::NativeTrace(const Params *p) : InstTracer(p) +NativeTrace::NativeTrace(const Params *p) + : InstTracer(p) { + if (ListenSocket::allDisabled()) + fatal("All listeners are disabled!"); + int port = 8000; while(!native_listener.listen(port, true)) { |