[Lldb-commits] [lldb] r176833 - Change Linux/POSIX to output inferior output in realtime.
Matt Kopec
Matt.Kopec at intel.com
Mon Mar 11 15:31:32 PDT 2013
Author: mkopec
Date: Mon Mar 11 17:31:31 2013
New Revision: 176833
URL: http://llvm.org/viewvc/llvm-project?rev=176833&view=rev
Log:
Change Linux/POSIX to output inferior output in realtime.
Modified:
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h
Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp?rev=176833&r1=176832&r2=176833&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Mon Mar 11 17:31:31 2013
@@ -206,6 +206,8 @@ ProcessPOSIX::DoLaunch (Module *module,
if (!error.Success())
return error;
+ SetSTDIOFileDescriptor(m_monitor->GetTerminalFD());
+
SetID(m_monitor->GetPID());
return error;
}
@@ -277,7 +279,6 @@ ProcessPOSIX::DoHalt(bool &caused_stop)
{
caused_stop = true;
}
-
return error;
}
@@ -584,27 +585,6 @@ ProcessPOSIX::PutSTDIN(const char *buf,
return status;
}
-size_t
-ProcessPOSIX::GetSTDOUT(char *buf, size_t len, Error &error)
-{
- ssize_t bytes_read;
-
- // The terminal file descriptor is always in non-block mode.
- if ((bytes_read = read(m_monitor->GetTerminalFD(), buf, len)) < 0)
- {
- if (errno != EAGAIN)
- error.SetErrorToErrno();
- return 0;
- }
- return bytes_read;
-}
-
-size_t
-ProcessPOSIX::GetSTDERR(char *buf, size_t len, Error &error)
-{
- return GetSTDOUT(buf, len, error);
-}
-
UnixSignals &
ProcessPOSIX::GetUnixSignals()
{
Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h?rev=176833&r1=176832&r2=176833&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h Mon Mar 11 17:31:31 2013
@@ -124,12 +124,6 @@ public:
virtual size_t
PutSTDIN(const char *buf, size_t len, lldb_private::Error &error);
- virtual size_t
- GetSTDOUT(char *buf, size_t len, lldb_private::Error &error);
-
- virtual size_t
- GetSTDERR(char *buf, size_t len, lldb_private::Error &error);
-
//--------------------------------------------------------------------------
// ProcessPOSIX internal API.
More information about the lldb-commits
mailing list