[Lldb-commits] [lldb] r198835 - Patch by Ari Grant

Enrico Granata egranata at apple.com
Wed Jan 8 18:28:25 PST 2014


Author: enrico
Date: Wed Jan  8 20:28:25 2014
New Revision: 198835

URL: http://llvm.org/viewvc/llvm-project?rev=198835&view=rev
Log:
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."


Modified:
    lldb/trunk/scripts/Python/python-typemaps.swig

Modified: lldb/trunk/scripts/Python/python-typemaps.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/python-typemaps.swig?rev=198835&r1=198834&r2=198835&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/python-typemaps.swig (original)
+++ lldb/trunk/scripts/Python/python-typemaps.swig Wed Jan  8 20:28:25 2014
@@ -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) {





More information about the lldb-commits mailing list