Add termination instructions when entering the interactive script interpreter.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121884 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/ScriptInterpreterPython.cpp b/source/Interpreter/ScriptInterpreterPython.cpp
index 1e3a308..a2c3116 100644
--- a/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/source/Interpreter/ScriptInterpreterPython.cpp
@@ -330,11 +330,20 @@
if (baton == NULL)
return 0;
+ FILE *out_fh = reader.GetDebugger().GetOutputFileHandle ();
+ if (out_fh == NULL)
+ out_fh = stdout;
+
ScriptInterpreterPython *script_interpreter = (ScriptInterpreterPython *) baton;
switch (notification)
{
case eInputReaderActivate:
{
+ if (out_fh)
+ {
+ ::fprintf (out_fh, "Python Interactive Interpreter. To exit Python, type 'quit()' or 'exit()'.\n");
+ ::fprintf (out_fh, "Do NOT use Ctrl-D (EOF) to exit, as that will cause the lldb debugger to hang.\n");
+ }
// Save terminal settings if we can
int input_fd;
FILE *input_fh = reader.GetDebugger().GetInputFileHandle();