ruby: Check stderr and not stdin before hanging on an assert.
authorSteve Reinhardt <steve.reinhardt@amd.com>
Mon, 11 May 2009 17:38:46 +0000 (10:38 -0700)
committerSteve Reinhardt <steve.reinhardt@amd.com>
Mon, 11 May 2009 17:38:46 +0000 (10:38 -0700)
src/mem/ruby/common/Debug.hh
src/mem/slicc/slicc_global.hh

index 6dce98dd5a212595a0cc92482849b5dd725d5fc1..8548e97727e18da4009a21246038ecb87e5d991f 100644 (file)
@@ -154,7 +154,7 @@ const bool ASSERT_FLAG = true;
            << __PRETTY_FUNCTION__ << " in "\
            << __FILE__ << ":"\
            << __LINE__ << endl << flush;\
-      if(isatty(STDIN_FILENO)) {\
+      if(isatty(STDERR_FILENO)) {\
         cerr << "At this point you might want to attach a debug to ";\
         cerr << "the running and get to the" << endl;\
         cerr << "crash site; otherwise press enter to continue" << endl;\
@@ -175,7 +175,7 @@ const bool ASSERT_FLAG = true;
          << __PRETTY_FUNCTION__ << " in "\
          << __FILE__ << ":"\
          << __LINE__ << endl << flush;\
-    if(isatty(STDIN_FILENO)) {\
+    if(isatty(STDERR_FILENO)) {\
       cerr << "press enter to continue" << endl;\
       cerr << "PID: " << getpid();\
       cerr << endl << flush; \
index caa5509f8861258bda75d561fcf69cb4da087410..3e4f37a57fb8dbadf07f4c6b5a5bdc44ce6623da 100644 (file)
@@ -67,7 +67,7 @@ const bool CHECK_INVALID_RESOURCE_STALLS = false;
            << __PRETTY_FUNCTION__ << " in "\
            << __FILE__ << ":"\
            << __LINE__ << endl;\
-      if(isatty(STDIN_FILENO)) {\
+      if(isatty(STDERR_FILENO)) {\
         cerr << "At this point you might want to attach a debug to ";\
         cerr << "the running and get to the" << endl;\
         cerr << "crash site; otherwise press enter to continue" << endl;\