summaryrefslogtreecommitdiffstats
path: root/lldb/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Change finishSwigPythonLLDB.py to copy six.py instead of simlink itTed Woodward2015-12-111-11/+26
| | | | | | | | | | | | Summary: If six.py is simlink'd, an installation won't be able to find it unless it has access to the source tree that lldb was built from. Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15422 llvm-svn: 255340
* Make it clear how you would get the pointee out of an SBValue withJim Ingham2015-12-041-0/+5
| | | | | | GetType().IsPointerType() returns true. llvm-svn: 254790
* Add documentation for SBTarget::CreateValueFromAddress.Jim Ingham2015-12-041-0/+18
| | | | llvm-svn: 254763
* Use sub-commands instead of --mode={client,server}.Zachary Turner2015-12-023-37/+40
| | | | | | | This is more pythonic and allows a more idiomatic way of getting detailed usage information for each individual sub-command. llvm-svn: 254533
* Unpack the output on the client, completing the cycle.Zachary Turner2015-11-304-39/+89
| | | | llvm-svn: 254341
* Have swig_bot actually run swig, and send back the output.Zachary Turner2015-11-304-36/+74
| | | | llvm-svn: 254340
* Be *stupider* about what constitutes a supported language binding.Zachary Turner2015-11-252-29/+2
| | | | | | | | | | | | | | | We were trying to be super smart and find all the supported language bindings. This led to us scanning the directory and treating all subdirectories as language binding directories. This makes it hard to add unrelated code in this folder. Besides, we only support one at the moment - Python. And when new ones are added it will be trivial to just add their names to a list. So this patch gets stupider about how to look for language binding subfolders. Just put them in a list, and use the list. llvm-svn: 254078
* Another hack to fix the build bot.Zachary Turner2015-11-241-1/+1
| | | | | | | | | This script really should not be assuming every subdirectory is a language directory for swig generation. Using a hack to get this working for now, but this should be solved once this script is re-written similar to how prepare_bindings was. llvm-svn: 254037
* Fix build after swig_bot_lib changes.Zachary Turner2015-11-241-1/+1
| | | | llvm-svn: 254033
* swig-bot - Close the socket when shutting down.Zachary Turner2015-11-241-5/+10
| | | | llvm-svn: 254026
* Include config settings in the archive, and extract on the remote.Zachary Turner2015-11-244-6/+81
| | | | llvm-svn: 254025
* Make swig_bot server support Ctrl+CZachary Turner2015-11-242-10/+21
| | | | llvm-svn: 254024
* swig_bot remote path connection / preliminary implementation.Zachary Turner2015-11-244-24/+253
| | | | | | | | | | | | | | | With this patch, the client will package up all the required inputs into a compressed zip file, establish a connection to the server, send the input to the server, and wait for the server to send a response (in this case the response is just echoed back to the client). This gets the network communication in place, and in a subsequent patch I will follow up with the code that actually runs swig on the server and sends back the output instead of echoing back the input. llvm-svn: 254023
* First implementation of swig_bot.pyZachary Turner2015-11-245-0/+183
| | | | | | | | | | | | | | | | | | | | | | This version supports local generation only. It's intentionally stupid, and does not support any kind of dependency checking. If you run the script, it's going to call SWIG. While this is a slow process, we are going to combine the use of the swig bot with checked in static bindings, meaning that it won't be terribly important to only regenerate the bindings when the input files have actually changed. A side benefit of this is that the implementation is drastically simpler. This is all experimental at the moment, but it duplicates a lot of the logic currently found in prepare_bindings.py. There was not a good way to reuse some of the logic without invasive changes on that script, and since this script is still experimental, it makes sense to just copy them over, and if / when this becomes more mature, we can get rid of the other ones. llvm-svn: 254022
* Create `lldbsuite.support.fs` and move `find_executable` there.Zachary Turner2015-11-211-58/+9
| | | | | | | I have plans to reuse this function in another script, so raising this out of prepare_bindings allows this. llvm-svn: 253755
* Enable saving of mini dumps with lldb process save-core.Adrian McCarthy2015-11-201-0/+3
| | | | | | | | Also adds SB API to save a core and tests that use it. Differential Revision: http://reviews.llvm.org/D14793 llvm-svn: 253734
* Revert "FOO"Adrian McCarthy2015-11-201-3/+0
| | | | | | | | Accidentally commited before I was done. This reverts commit 2ec2da4ee52780582d5e9c88b2e982a688fbdbe1. llvm-svn: 253685
* FOOAdrian McCarthy2015-11-201-0/+3
| | | | llvm-svn: 253684
* Remove `lldb.root` and just look for the file we care about.Zachary Turner2015-11-202-2/+2
| | | | llvm-svn: 253679
* Revert "prepare_bindings.py: enable static bindings"Todd Fiala2015-11-194-83995/+19
| | | | | | This reverts commit 40f789f2dc6bb80fd25a33f91e452d081ed9d0ee. llvm-svn: 253575
* Remove superseded buildSwigWrapperClasses.py and buildSwigPython.py classesTodd Fiala2015-11-183-1234/+1
| | | | | | | This closes: http://reviews.llvm.org/D14783 llvm-svn: 253513
* Remove the scripts/Python/build-swig-Python.sh script.Todd Fiala2015-11-181-378/+0
| | | | | | This logically goes with my previous commit. llvm-svn: 253491
* remove defunct scripts/build-swig-wrapper-classes.sh; switch autoconf build ↵Todd Fiala2015-11-181-151/+0
| | | | | | | | to prepare_bindings.py. Xcode moved off of build-swig-wrapper-classes.sh earlier this week. llvm-svn: 253490
* Fix some issues with swig & string conversion.Zachary Turner2015-11-181-5/+16
| | | | | | | | | | | | | | | | | | | | This patch fixes two issues: 1) Popen needs to be used with universal_newlines=True by default. This elicits automatic decoding from bytes -> string in Py3, and has no negative effects in other Py versions. 2) The swig typemaps for converting between string and (char*, int) did not work correctly when the length of the string was 0, indicating an error. In this case we would try to construct a string from uninitialized data. 3) Ironically, the bug mentioned in #2 led to a test passing on Windows that was actually broken, because the test was written such that the assertion was never even getting checked, so it passed by default. So we additionally fix this test to also fail if the method errors. By fixing this test it's now broken on Windows, so we also xfail it. llvm-svn: 253487
* Switched cmake build from using buildSwigWrapperClases.py to the cleaned up ↵Todd Fiala2015-11-181-1/+2
| | | | | | | | | | | | | | version. This change does not introduce static bindings. It is simply using the pylinted cleaned up code in prepare_bindings.py. If this breaks anyting, I'll revert immediately and figure out what needs to be addressed. I'm looking to wrap up the cleanup aspect of the code change (pylinted, removal of code that implements existing python stdlib code, fixes for Xcode adoption, etc.). llvm-svn: 253478
* prepare_bindings.py: enable static bindingsTodd Fiala2015-11-184-19/+83995
| | | | | | | | | | | | | | | Added a new flag, --allow-static-binding. When specified, if (and only if) the swig binary cannot be found, then the LLDBWrapPython.cpp and lldb.py from the scripts/Python/{static-binding-dir} are copied into the place where swig would have generated them. {static-binding-dir} defaults to static-binding, and can be overridden with the --static-binding-dir command line argument. The static bindings checked in are from r253424. llvm-svn: 253448
* Added --find-swig option to allow searching for swig in path or other likely ↵Todd Fiala2015-11-171-0/+76
| | | | | | locations. llvm-svn: 253346
* Add Pythonic language binding wrapper generation script.Todd Fiala2015-11-172-0/+631
| | | | | | | | | | | | | | | | | | | | | | | | This is only used by Xcode at the moment. It replaces the buildSwigWrapperClasses.py and related per-script-language scripts. It also fixes a couple bugs in those w/r/t Xcode usage: * the presence of the GCC_PREPROCESSOR_DEFINITIONS env var should not be short-circuiting generation of the language binding; rather, only if LLDB_DISABLE_PYTHON is present within that environment variable. * some logic around what to do when building in "non-Makefile" mode. I've switched the handling of that to be on a "--framework" flag - if specified, we build an OS X-style framework; otherwise, we go with non. Putting this up now only attached to the Xcode build so others can look at it but not be affected by it yet. After this, I'll tackle the finalizer, along with trying it locally on Linux. llvm-svn: 253317
* Add the ability (through the SB API & command line) to specify an addressJim Ingham2015-11-171-0/+3
| | | | | | | | breakpoint as "file address" so that the address breakpoint will track that module even if it gets loaded in a different place. Also fixed the Address breakpoint resolver so that it handles this tracking correctly. llvm-svn: 253308
* Insert the SWIG version into LLDB's __init__.pyZachary Turner2015-11-161-5/+30
| | | | | | | The goal here is to allow us to add skip / xfail decorators based on SWIG version. llvm-svn: 253262
* Python3 - Fix some issues related to `PythonFile` class.Zachary Turner2015-11-161-0/+5
| | | | | | | | Python 3 has lots of new debug asserts, and some of these were firing on PythonFile. Specifically related to handling of invalid files. llvm-svn: 253261
* Allow to override python-config executable name from command lineBruce Mitchener2015-11-151-1/+2
| | | | | | | | | | | | | | Summary: pkgsrc (on NetBSD) ships with python2.7-config. Patch by Kamil Rytarowski. Thanks! Reviewers: emaste, clayborg Subscribers: brucem, lldb-commits, joerg Differential Revision: http://reviews.llvm.org/D14528 llvm-svn: 253152
* Delete `PyObjectToString` and use `PythonObject::Str()`.Zachary Turner2015-11-131-43/+12
| | | | | | | The latter function, from PythonDataObjects, is Python 3 ready and the former was not. llvm-svn: 252992
* Finish PyCallable -> PythonCallable conversion.Zachary Turner2015-11-121-258/+88
| | | | | | | | | | | | | | This finishes the effort to port python-wrapper.swig code over to using PythonDataObjects. Also included in this patch is the removal of `PyCallable` from `python-wrapper.swig`, as it is no longer used after having been replaced by `PythonCallable` everywhere. There might be additional cleanup as followup patches, but it should be all fairly simple and minor. llvm-svn: 252939
* Fix non-Windows build after r252906.Zachary Turner2015-11-122-1/+2
| | | | llvm-svn: 252909
* Begin converting uses of PyCallable to PythonCallable.Zachary Turner2015-11-121-213/+157
| | | | | | | | | | | | | | | | PyCallable is a class that exists solely within the swig wrapper code. PythonCallable is a more generic implementation of the same idea that can be used by any Python-related interop code, and lives in PythonDataObjects.h The CL is mostly mechanical, and it doesn't cover every possible user of PyCallable, because I want to minimize the impact of this change (as well as making it easier to figure out what went wrong in case this causes a failure). I plan to finish up the rest of the changes in a subsequent patch, culminating in the removal of PyCallable entirely. llvm-svn: 252906
* Remove `FindSessionDictionary` and rely on PythonDataObjects.Zachary Turner2015-11-111-190/+140
| | | | | | | | This had been relegated to a simple forwarding function, so just delete it in preparation of migrating all of these functions out of python-wrapper.swig. llvm-svn: 252803
* Convert python-wrapper.swig to use PythonDataObjects.Zachary Turner2015-11-111-99/+43
| | | | | | | | | This only begins to port python-wrapper.swig over. Since this code can be pretty hairy, I plan to do this incrementally over a series of patches, each time removing or converting more code over to the PythonDataObjects code. llvm-svn: 252788
* Python 3 - Use six in our embedded Python glue code.Zachary Turner2015-11-112-1/+3
| | | | llvm-svn: 252767
* Symlink the `six` module during swig generation.Zachary Turner2015-11-112-22/+44
| | | | llvm-svn: 252764
* Fixed TypeMemberFunctionImpl to not use clang types directly but use the new ↵Greg Clayton2015-11-103-0/+23
| | | | | | | | | | CompilerDecl class to do the job in an abstract way. Fixed a crash that would happen if you tried to get the name of a constructor or destructor by calling "getDeclName()" instead of calling getName() (which would assert and crash). Added the ability to get function arguments names from SBFunction. llvm-svn: 252622
* Use PythonDataObjects in swig helper functions.Zachary Turner2015-11-091-31/+31
| | | | | | | | | | | | | | | | | Relying on manual Python C API calls is error prone, especially when trying to maintain compatibility with Python 2 and Python 3. This patch additionally fixes what appears to be a potentially serious memory leak, in that were were incref'ing two values returned from the session dictionary but never decref'ing them. There was a comment indicating that it was intentional, but the reasoning was, I believe, faulty and it resulted in a legitimate memory leak. Switching everything to PythonObject based classes solves both the compatibility issues as well as the resource leak issues. llvm-svn: 252536
* Add SBType::IsAnonymousType() and relative plumbing in the debugger internalsEnrico Granata2015-11-071-0/+3
| | | | | | | | For language that support such a thing, this API allows to ask whether a type is anonymous (i.e. has been given no name) Comes with test case llvm-svn: 252390
* Remove a debug print statement.Zachary Turner2015-11-071-1/+0
| | | | llvm-svn: 252384
* Python 3 - Use __bool__() instead of __nonzero__() for truthiness.Zachary Turner2015-11-074-2/+62
| | | | | | | | | | | | | | | | | | | | | | | Python has a complicated mechanism of checking an objects truthity. This involves a number of steps, which end with calling two private methods on an object (if they are implemented). In Python 2 these two methods are `__nonzero__` and `__len__`, and in Python 3 they are `__bool__` and `__len__`. Because we *also* define a __len__ method for certain iterable types, this was triggering a situation in Python 3 where `__nonzero__` wasn't defined, so it was calling `__len__`, which was returning 0 (for example an SBDebugger with no targets), and as a result the truthosity was determined to be False. We fix this by correctly using ` __bool__` for Python 3, and leave the behavior under Python 2 unchanged. Note that this fix is only implemented in the SWIG generation python script, and not the SWIG generation shell script. Someone more familiar than me with shell scripts will need to fix them to support this for Python 3 if desired. llvm-svn: 252382
* Make the language specifier to "break set" actually filter the names by ↵Jim Ingham2015-11-061-0/+21
| | | | | | | | | | | | | their language. So for instance: break set -l c++ -r Name will only break on C++ symbols that match Name, not ObjC or plain C symbols. This also works for "break set -n" and there are SB API's to pass this as well. llvm-svn: 252356
* [swig] Remove check_lldb_swig_executable_file_exists.Bruce Mitchener2015-11-062-169/+22
| | | | | | | | | | | | | | | | | Summary: Code that tried to find swig and then split the path into a separate path and filename is being removed. The invoking build system always provides the location of swig and we don't need to split it into 2 pieces only to recombine it a short time later. Reviewers: zturner, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14415 llvm-svn: 252330
* [swig] Start of pylint on python build scripts.Bruce Mitchener2015-11-058-1628/+1614
| | | | | | | | | | | | | | | | | | | | | | | Summary: This does a broad first pass on cleaning up a lot of the noise when using pylint on these scripts. It mostly addresses issues of: * Mixed tabs and spaces. * Trailing whitespace. * Semicolons where they aren't needed. * Incorrect whitespace around () and []. * Superfluous parentheses. There will be subsequent patches with further changes that build upon these. Reviewers: zturner, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14375 llvm-svn: 252244
* Update for tvos or watchos builds.Jason Molenda2015-11-051-0/+6
| | | | llvm-svn: 252234
* Don't access class members inside of `__del__`.Zachary Turner2015-11-041-4/+0
| | | | | | Apparently this doesn't work as the attribute doesn't exist anymore. llvm-svn: 252091
OpenPOWER on IntegriCloud