diff options
author | Caroline Tice <ctice@apple.com> | 2011-05-09 23:06:58 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2011-05-09 23:06:58 +0000 |
commit | 9088b06899903c8ddc90f6b8ea60032f7f012807 (patch) | |
tree | c64b52c302b3a1627d075bde46d38d9790716aca /lldb/source/API/SBDebugger.cpp | |
parent | 0f8bc97abd6dc531c07c62000e3e836265037382 (diff) | |
download | bcm5719-llvm-9088b06899903c8ddc90f6b8ea60032f7f012807.tar.gz bcm5719-llvm-9088b06899903c8ddc90f6b8ea60032f7f012807.zip |
Make sure writing asynchronous output only backs up
& overwrites prompt if the IOChannel input reader is the top
input reader.
llvm-svn: 131110
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r-- | lldb/source/API/SBDebugger.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index 04f15cbba3f..c494c594a50 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -619,6 +619,24 @@ SBDebugger::DispatchInputEndOfFile () if (m_opaque_sp) m_opaque_sp->DispatchInputEndOfFile (); } + +bool +SBDebugger::InputReaderIsTopReader (const lldb::SBInputReader &reader) +{ + LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + + if (log) + log->Printf ("SBDebugger(%p)::InputReaderIsTopReader (SBInputReader(%p))", m_opaque_sp.get(), &reader); + + if (m_opaque_sp && reader.IsValid()) + { + InputReaderSP reader_sp (*reader); + return m_opaque_sp->InputReaderIsTopReader (reader_sp); + } + + return false; +} + void SBDebugger::PushInputReader (SBInputReader &reader) |