mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-14 16:46:06 +00:00
Add termination instructions when entering the interactive script interpreter.
llvm-svn: 121884
This commit is contained in:
parent
1da294a9d6
commit
a51174af72
@ -330,11 +330,20 @@ ScriptInterpreterPython::InputReaderCallback
|
|||||||
if (baton == NULL)
|
if (baton == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
FILE *out_fh = reader.GetDebugger().GetOutputFileHandle ();
|
||||||
|
if (out_fh == NULL)
|
||||||
|
out_fh = stdout;
|
||||||
|
|
||||||
ScriptInterpreterPython *script_interpreter = (ScriptInterpreterPython *) baton;
|
ScriptInterpreterPython *script_interpreter = (ScriptInterpreterPython *) baton;
|
||||||
switch (notification)
|
switch (notification)
|
||||||
{
|
{
|
||||||
case eInputReaderActivate:
|
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
|
// Save terminal settings if we can
|
||||||
int input_fd;
|
int input_fd;
|
||||||
FILE *input_fh = reader.GetDebugger().GetInputFileHandle();
|
FILE *input_fh = reader.GetDebugger().GetInputFileHandle();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user