summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/PythonDataObjects.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added Repr() and Str() member functions to our PythonObject class to allow ↵Enrico Granata2013-07-121-0/+22
| | | | | | easy conversion to-string of every PythonObject llvm-svn: 186205
* Fix various build warnings.Matt Kopec2013-06-031-2/+3
| | | | llvm-svn: 183140
* Fixed a file leak introduced with my last checkin. Also be sure to include ↵Greg Clayton2013-05-221-5/+8
| | | | | | <stdio.h> just in case. llvm-svn: 182537
* Added a new "lldb" log channel named "os" for the OperatingSystem plug-ins ↵Greg Clayton2013-05-221-1/+26
| | | | | | | | to use. Added logging for the OS plug-in python objects in OperatingSystemPython so we can see the python dictionary returned from the plug-in when logging is enabled. llvm-svn: 182530
* <rdar://problem/13069948>Greg Clayton2013-01-251-2/+8
| | | | | | | | | | | | Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary. So I defined a new "lldb::offset_t" which should be used for all file offsets. After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed. Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections. llvm-svn: 173463
* <rdar://problem/13010007>Greg Clayton2013-01-181-128/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | Added the ability for OS plug-ins to lazily populate the thread this. The python OS plug-in classes can now implement the following method: class OperatingSystemPlugin: def create_thread(self, tid, context): # Return a dictionary for a new thread to create it on demand This will add a new thread to the thread list if it doesn't already exist. The example code in lldb/examples/python/operating_system.py has been updated to show how this call us used. Cleaned up the code in PythonDataObjects.cpp/h: - renamed all classes that started with PythonData* to be Python*. - renamed PythonArray to PythonList. Cleaned up the code to use inheritance where - Centralized the code that does ref counting in the PythonObject class to a single function. - Made the "bool PythonObject::Reset(PyObject *)" function be virtual so each subclass can correctly check to ensure a PyObject is of the right type before adopting the object. - Cleaned up all APIs and added new constructors for the Python* classes to they can all construct form: - PyObject * - const PythonObject & - const lldb::ScriptInterpreterObjectSP & Cleaned up code in ScriptInterpreterPython: - Made calling python functions safer by templatizing the production of value formats. Python specifies the value formats based on built in C types (long, long long, etc), and code often uses typedefs for uint32_t, uint64_t, etc when passing arguments down to python. We will now always produce correct value formats as the templatized code will "do the right thing" all the time. - Fixed issues with the ScriptInterpreterPython::Locker where entering the session and leaving the session had a bunch of issues that could cause the "lldb" module globals lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame to not be initialized. llvm-svn: 172873
* Fix include path for Linux and FreeBSD.Filipe Cabecinhas2012-08-271-1/+1
| | | | llvm-svn: 162679
* The OS plug-in can now get data from a python script that implements the ↵Greg Clayton2012-08-241-1/+9
| | | | | | protocol. llvm-svn: 162540
* Added Args::StringForEncoding(), Args::StringToGenericRegister() and ↵Greg Clayton2012-08-241-5/+30
| | | | | | | | centralized the parsing of the string to encoding and string to generic register. Added code the initialize the register context in the OperatingSystemPython plug-in with the new PythonData classes, and added a test OperatingSystemPython module in lldb/examples/python/operating_system.py that we can use for testing. llvm-svn: 162530
* Switch over to using object instances for all PythonData objects.Greg Clayton2012-08-231-52/+100
| | | | llvm-svn: 162504
* A first version of a bunch of classes that wrap commonly used Python objects ↵Enrico Granata2012-08-231-0/+234
in a ref-counting and type-safe C++ API llvm-svn: 162481
OpenPOWER on IntegriCloud