llvm-project/lldb/source
Zachary Turner 9c40264fda Introduce a `PythonFile` object, and use it everywhere.
Python file handling got an overhaul in Python 3, and it affects
the way we have to interact with files.  Notably:

1) `PyFile_FromFile` no longer exists, and instead we have to use
   `PyFile_FromFd`.  This means having a way to get an fd from
   a FILE*.  For this we reuse the lldb_private::File class to
   convert between FILE*s and fds, since there are some subtleties
   regarding ownership rules when FILE*s and fds refer to the same
   file.
2) PyFile is no longer a builtin type, so there is no such thing as
   `PyFile_Check`.  Instead, files in Python 3 are just instances
   of `io.IOBase`.  So the logic for checking if something is a file
   in Python 3 is to check if it is a subclass of that module.

Additionally, some unit tests are added to verify that `PythonFile`
works as expected on Python 2 and Python 3, and
`ScriptInterpreterPython` is updated to use `PythonFile` instead of
manual calls to the various `PyFile_XXX` methods.

llvm-svn: 250444
2015-10-15 19:35:48 +00:00
..
API cmake: provide flag that enables 'log enable --stack' to provide useful file/function info on POSIX systems 2015-10-14 14:52:15 +00:00
Breakpoint [LLDB] Fix display of value of a vector variables in watchpoint operations 2015-10-09 15:13:20 +00:00
Commands Revert "RenderScript command for printing allocation contents" 2015-10-14 11:50:37 +00:00
Core Fix a problem where LLDB could sometimes try to get the size of an Objective-C type without passing an appropriate ExecutionContext 2015-10-14 22:44:30 +00:00
DataFormatters Route the preferred-display-language mechanism to the ValueObjectPrinter and actually fill in a few gaps for dynamic and synthetic values to be able to adopt this in useful ways 2015-10-07 02:36:35 +00:00
Expression Decide on the expression language inside UserExpression 2015-10-07 22:01:12 +00:00
Host Introduce a `PythonFile` object, and use it everywhere. 2015-10-15 19:35:48 +00:00
Initialization TypeSystem is now a plugin interface and removed any "ClangASTContext &Class::GetClangASTContext()" functions. 2015-09-17 22:23:34 +00:00
Interpreter Added support for enumerating the languages that actually support TypeSystems 2015-10-08 23:07:53 +00:00
Plugins Introduce a `PythonFile` object, and use it everywhere. 2015-10-15 19:35:48 +00:00
Symbol Fix a couple issues where trying to print a type would cause LLDB to crash 2015-10-14 22:44:50 +00:00
Target Make uses of /dev/null portable across OSes. 2015-10-14 21:37:36 +00:00
Utility lldb-server: add support for binary memory reads 2015-10-14 12:59:37 +00:00
CMakeLists.txt Fix handling of LLDB_VERS_GENERATED_FILE. 2015-10-09 03:40:55 +00:00
Makefile [Makefiles] Align library names with CMake build 2015-07-14 20:25:19 +00:00
lldb.cpp Move LLDB initialization/shutdown to Initialization. 2015-03-19 22:00:21 +00:00