summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-01-09 02:28:25 +0000
committerEnrico Granata <egranata@apple.com>2014-01-09 02:28:25 +0000
commitd9bd4ae77be31aa707e91209a610a7e119362dc0 (patch)
tree99b2122baec43ea3c2ce8a3fd3e0463e11b07363 /lldb/scripts/Python
parent83b11aae180d67ba06764a94dca4ec320e65b1f3 (diff)
downloadbcm5719-llvm-d9bd4ae77be31aa707e91209a610a7e119362dc0.tar.gz
bcm5719-llvm-d9bd4ae77be31aa707e91209a610a7e119362dc0.zip
Patch by Ari Grant
"Open LLDB and run: (lldb) script print lldb.debugger.GetInputFileHandle() This puts the debugger into a catatonic state and all interactions seem to enter a black hole. The reason is that executing this commnand actually *CLOSES* the input file handle and so all input is dropped on the floor. Oof! The fix is simple: flush a descriptor, instead of closing it, when transferring ownership." llvm-svn: 198835
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r--lldb/scripts/Python/python-typemaps.swig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/scripts/Python/python-typemaps.swig b/lldb/scripts/Python/python-typemaps.swig
index be76eae5b7e..24bb2b8ca46 100644
--- a/lldb/scripts/Python/python-typemaps.swig
+++ b/lldb/scripts/Python/python-typemaps.swig
@@ -440,7 +440,7 @@
else // if (flags & __SRW)
mode[i++] = 'a';
#endif
- $result = PyFile_FromFile($1, const_cast<char*>(""), mode, fclose);
+ $result = PyFile_FromFile($1, const_cast<char*>(""), mode, fflush);
}
%typemap(in) (const char* string, int len) {
OpenPOWER on IntegriCloud