[Lldb-commits] [lldb] r217843 - Continuation broken for Python scripts when using non-interactive input (Xcode for example).
Greg Clayton
gclayton at apple.com
Mon Sep 15 15:46:26 PDT 2014
Author: gclayton
Date: Mon Sep 15 17:46:25 2014
New Revision: 217843
URL: http://llvm.org/viewvc/llvm-project?rev=217843&view=rev
Log:
Continuation broken for Python scripts when using non-interactive input (Xcode for example).
The problem was the read_func we were supplying to the interactive interpreter wasn't stripping the newline from the end of the string. Now it does and multi-line python scripts can be typed in Xcode.
<rdar://problem/17696438>
Modified:
lldb/trunk/source/Interpreter/embedded_interpreter.py
Modified: lldb/trunk/source/Interpreter/embedded_interpreter.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/embedded_interpreter.py?rev=217843&r1=217842&r2=217843&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/embedded_interpreter.py (original)
+++ lldb/trunk/source/Interpreter/embedded_interpreter.py Mon Sep 15 17:46:25 2014
@@ -61,7 +61,7 @@ def get_terminal_size(fd):
def readfunc_stdio(prompt):
sys.stdout.write(prompt)
- return sys.stdin.readline()
+ return sys.stdin.readline().rstrip()
def run_python_interpreter (local_dict):
# Pass in the dictionary, for continuity from one session to the next.
More information about the lldb-commits
mailing list