summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-05-29 04:06:55 +0000
committerGreg Clayton <gclayton@apple.com>2011-05-29 04:06:55 +0000
commitfc3f027d33e71b490b293f074e7761b8b76c8096 (patch)
tree260314010e75ee4507c2b6858b63d2cc305dd712 /lldb/source
parent2e84c827506202350ce3c5b2c602867ac449d2b4 (diff)
downloadbcm5719-llvm-fc3f027d33e71b490b293f074e7761b8b76c8096.tar.gz
bcm5719-llvm-fc3f027d33e71b490b293f074e7761b8b76c8096.zip
Don't have the debugger default to ignoring EOF. This is only what the driver
(or anything running in a terminal) wants. Not what a UI (Xcode) would want where it creates a debugger per debug window. The current code had an infinite loop after a debug session ended. llvm-svn: 132280
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBDebugger.cpp14
-rw-r--r--lldb/source/Core/Debugger.cpp13
2 files changed, 26 insertions, 1 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index c494c594a50..33f9760e107 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -861,3 +861,17 @@ SBDebugger::SetCurrentPlatform (const char *platform_name)
return sb_error;
}
+bool
+SBDebugger::GetCloseInputOnEOF () const
+{
+ if (m_opaque_sp)
+ return m_opaque_sp->GetCloseInputOnEOF ();
+ return false;
+}
+
+void
+SBDebugger::SetCloseInputOnEOF (bool b)
+{
+ if (m_opaque_sp)
+ m_opaque_sp->SetCloseInputOnEOF (b);
+}
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 8c5ebe27a5d..6cbc92ed3aa 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -233,7 +233,6 @@ Debugger::Debugger () :
m_input_readers (),
m_input_reader_data ()
{
- m_input_comm.SetCloseOnEOF(false);
m_command_interpreter_ap->Initialize ();
// Always add our default platform to the platform list
PlatformSP default_platform_sp (Platform::GetDefaultPlatform());
@@ -256,6 +255,18 @@ Debugger::~Debugger ()
bool
+Debugger::GetCloseInputOnEOF () const
+{
+ return m_input_comm.GetCloseOnEOF();
+}
+
+void
+Debugger::SetCloseInputOnEOF (bool b)
+{
+ m_input_comm.SetCloseOnEOF(b);
+}
+
+bool
Debugger::GetAsyncExecution ()
{
return !m_command_interpreter_ap->GetSynchronous();
OpenPOWER on IntegriCloud