summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2010-12-15 19:51:12 +0000
committerCaroline Tice <ctice@apple.com>2010-12-15 19:51:12 +0000
commita51174af72e0ff8ccff9e5fc04b11a4c44f4d99c (patch)
tree9c6d60308ff25c134d941b52ea9a9eb61d70d665
parent1da294a9d645c5e39709d0e2194a0ba2b4891cfc (diff)
downloadbcm5719-llvm-a51174af72e0ff8ccff9e5fc04b11a4c44f4d99c.tar.gz
bcm5719-llvm-a51174af72e0ff8ccff9e5fc04b11a4c44f4d99c.zip
Add termination instructions when entering the interactive script interpreter.
llvm-svn: 121884
-rw-r--r--lldb/source/Interpreter/ScriptInterpreterPython.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
index 1e3a308e83c..a2c31165ae8 100644
--- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
@@ -330,11 +330,20 @@ ScriptInterpreterPython::InputReaderCallback
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();
OpenPOWER on IntegriCloud