summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2017-10-17 03:03:44 +0000
committerJason Molenda <jmolenda@apple.com>2017-10-17 03:03:44 +0000
commit695a1f6e6cf7f164b71c5ee9f1756374547114c9 (patch)
tree9621ad0c8eb1af0a097801896bbc34dc7433bdba /lldb/source/API
parent45623bd06dfc763241b82be152d0d01d7bb5cf32 (diff)
downloadbcm5719-llvm-695a1f6e6cf7f164b71c5ee9f1756374547114c9.tar.gz
bcm5719-llvm-695a1f6e6cf7f164b71c5ee9f1756374547114c9.zip
Committing this for Larry D'Anna:
This patch adds support for passing an arbitrary python stream (anything inheriting from IOBase) to SetOutputFileHandle or SetErrorFileHandle. Differential revision: https://reviews.llvm.org/D38829 <rdar://problem/34870417> llvm-svn: 315966
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBDebugger.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 0185f1e9ec4..cc28e437386 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -270,6 +270,18 @@ void SBDebugger::SetInputFileHandle(FILE *fh, bool transfer_ownership) {
m_opaque_sp->SetInputFileHandle(fh, transfer_ownership);
}
+void SBDebugger::Flush() {
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
+
+ if (log)
+ log->Printf(
+ "SBDebugger(%p)::Flush ()",
+ static_cast<void *>(m_opaque_sp.get()));
+
+ if (m_opaque_sp)
+ m_opaque_sp->Flush();
+}
+
void SBDebugger::SetOutputFileHandle(FILE *fh, bool transfer_ownership) {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
OpenPOWER on IntegriCloud