summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/finishSwigPythonLLDB.py
Commit message (Collapse)AuthorAgeFilesLines
* Symlink the `six` module during swig generation.Zachary Turner2015-11-111-22/+43
| | | | llvm-svn: 252764
* [swig] Start of pylint on python build scripts.Bruce Mitchener2015-11-051-330/+328
| | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Python 3 - Don't add the _d suffix to the symlink on Windows."Zachary Turner2015-11-041-4/+2
| | | | | | | | | | | | This reverts commit e59c95ca936f5a0a8abb987b8605fd8bf82b03b6. This was a mistake on my part. The real problem was with my environment. I was using a release interpreter to try to load my debug extension module. I noticed this after I finally managed to get into my extension module's init method, and then it segfaulted with heap errors due to mismatched CRT (debug vs. release) llvm-svn: 252030
* Python 3 - Don't add the _d suffix to the symlink on Windows.Zachary Turner2015-11-041-2/+4
| | | | | | | | | | | In Python 2, a debug extension module required an _d suffix, so for example the extension module `_lldb` would be backed by the file `_lldb_d.pyd` if built in debug mode, and `_lldb.pyd` if built in release mode. In Python 2, although undocumented, this seems to no longer be the case, and even for a debug extension module, the interpreter will only look for the `_lldb.pyd` name. llvm-svn: 252026
* Revert part of r239007 related to creating the Python symlink.Zachary Turner2015-11-021-9/+0
| | | | | | | | | | | | | | | This has apparently been broken since June, but only on non-Windows. Perhaps nobody noticed it because if the symlink is already there it won't try to re-create it, and nobody ever tried doing a clean build. In any case, I will let the original author attempt to fix this if he is still interested. the problem is that in the normal case of not setting BUILD_SHARED_LIBS and simply running ninja, it would link _lldb.so to a non-existent location, creating a dangling symlink. llvm-svn: 251840
* Rename argdumper to lldb-argdumperTodd Fiala2015-10-291-8/+8
| | | | | | http://reviews.llvm.org/D14169 llvm-svn: 251616
* Run py2to3 on lldb/scripts folder.Zachary Turner2015-10-191-16/+16
| | | | | | | This mostly fixes some print statements, but there were also some instances of dict.iteritems() lingering that this found. llvm-svn: 250762
* Make swig generation python scripts python 3 compatible.Zachary Turner2015-10-161-26/+26
| | | | llvm-svn: 250532
* [lldb] Enable building with Cmake/BUILD_SHARED_LIBSAndrew Wilkins2015-06-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Several changes to fix CMake builds of LLDB with the BUILD_SHARED_LIBS setting on. - Force all internal libraries to be built STATIC. - Add additional library dependencies (pthread, dl, runtimedyld). - modify finalisation of SWIG wrapper to symlink the "lib" dir into python/site-packages, so _lldb.so's RPATH resolves. Test Plan: Verified one test case with "dotest.py". Reviewers: sylvestre.ledru, zturner Reviewed By: zturner Subscribers: zturner, ted, tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10157 llvm-svn: 239007
* Use the debugginess of the python interpreter when symlinking _lldb.pyd.Zachary Turner2015-04-221-2/+4
| | | | | | | | | | | | | | Previously we would pass an argument to finishSwigWrapperClasses.py which specified whether this was a debug or a release build. But sometimes CMAKE_BUILD_TYPE would not be set to anything, causing this argument to be empty when passed in. The only purpose of this argument was to determine whether or not to append _d to the extension module when creating the symlink. This is only necessary when doing a debug build of LLDB on Windows, which implies a debug interpreter, so we replace this with a check to see if the running interpreter is a debug one, and append _d if so. llvm-svn: 235559
* Don't use literal slashes when concatenating paths in Python.Zachary Turner2015-04-031-38/+34
| | | | | | | | This patch fixes the swig generation scripts to use os.path.join instead, which produces correctly normalized paths for platforms that don't use the standard forward slash separator. llvm-svn: 234030
* Remove non-standard Environment header sectionEd Maste2015-03-231-5/+0
| | | | llvm-svn: 232973
* Use .so library extension by default if platform is not Windows or DarwinEd Maste2015-03-231-3/+3
| | | | llvm-svn: 232970
* Fix whitespace in finishSwigWrapperClasses.pyEd Maste2015-03-231-659/+659
| | | | | | | - replace hard tabs with 4-space indents - delete EOL whitespace llvm-svn: 232969
* [swig] Fix some typos in the build scripts.Bruce Mitchener2015-02-261-1/+1
| | | | | | | | | | | | Reviewers: zturner, ki.stfu Reviewed By: zturner, ki.stfu Subscribers: ki.stfu, lldb-commits Differential Revision: http://reviews.llvm.org/D7912 llvm-svn: 230706
* Fix make_symlink in case when symlink already exists (after r229517)Ilia K2015-02-181-0/+2
| | | | llvm-svn: 229682
* Fix typo in make_symlink after r229517. It fixes symlinks on a UNIX style ↵Ilia K2015-02-181-1/+0
| | | | | | platform. llvm-svn: 229674
* Fix argdumper build in cmake (OS X) after r228636Ilia K2015-02-171-127/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previos version of this patch (see r229148) contained two errors: * make_symlink_darwin_debug passes 2 arguments into make_symlink, but it required 4 arguments (was fixed by r229159) * make_symlink doesn't work on OS X As a quick fix, the r229148 and the r229159 were reverted. Now these errors are fixed. Summary: This patch fixes the following tests on OS X: ``` FAIL: test_with_dsym (TestLaunchWithGlob.LaunchWithGlobTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 456, in wrapper return func(self, *args, **kwargs) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 21, in test_with_dsym self.do_test () File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd())) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully Config=x86_64-clang ====================================================================== FAIL: test_with_dwarf (TestLaunchWithGlob.LaunchWithGlobTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 473, in wrapper return func(self, *args, **kwargs) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 28, in test_with_dwarf self.do_test () File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd())) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully ``` Reviewers: epertoso, emaste, abidh, clayborg, zturner Reviewed By: clayborg Subscribers: abidh, lldb-commits, emaste, epertoso, zturner, clayborg Differential Revision: http://reviews.llvm.org/D7550 llvm-svn: 229517
* Fix build: revert r229148 "Fix argdumper build in cmake (OS X) after ↵Ilia K2015-02-131-172/+123
| | | | | | r228636" and r229159 "Fix build: make_symlink_darwin_debug passes 2 arguments into make_symlink, but it requires 4 arguments" llvm-svn: 229166
* Fix build: make_symlink_darwin_debug passes 2 arguments into make_symlink, ↵Ilia K2015-02-131-1/+1
| | | | | | but it requires 4 arguments llvm-svn: 229159
* Fix argdumper build in cmake (OS X) after r228636Ilia K2015-02-131-123/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes the following tests on OS X: ``` FAIL: test_with_dsym (TestLaunchWithGlob.LaunchWithGlobTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 456, in wrapper return func(self, *args, **kwargs) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 21, in test_with_dsym self.do_test () File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd())) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully Config=x86_64-clang ====================================================================== FAIL: test_with_dwarf (TestLaunchWithGlob.LaunchWithGlobTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 473, in wrapper return func(self, *args, **kwargs) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 28, in test_with_dwarf self.do_test () File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd())) File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully ``` Reviewers: epertoso, emaste, abidh, clayborg, zturner Reviewed By: clayborg Subscribers: abidh, lldb-commits, emaste, epertoso, zturner, clayborg Differential Revision: http://reviews.llvm.org/D7550 llvm-svn: 229148
* Fix darwin-debug build in cmake (OS X)Zachary Turner2015-01-261-2/+58
| | | | | | | | | | | | | This patch fixes test_launch_in_terminal test which doesn't work in OS X since the moment as it was added in r225284. The test fails because Target::Launch returns the following error: "the darwin-debug executable doesn't exist at <output_dir>/lib/python2.7/site-packages/lldb/darwin-debug'". Patch by Ilia K Differential Revision: http://reviews.llvm.org/D7102 llvm-svn: 227096
* Create an _d suffixed symlink when doing a debug Windows build.Zachary Turner2014-07-171-1/+8
| | | | | | | | | | | _lldb is built as an extension module on Windows. Normally to load an extension module named 'foo', Python would look for the file 'foo.pyd'. However, when a debug interpreter is used, Python will look for the file 'foo_d.pyd'. This change checks the build configuration and creates the correct symlink name based on the build configuration. llvm-svn: 213306
* Get the python scripting interface working on Windows.Zachary Turner2014-07-101-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a number of issues with embedded Python on Windows. In particular: 1) The script that builds the python modules was normalizing the case of python filenames during copies. The module name is the filename, and is case-sensitive, so this was breaking code. 2) Changes the build to not attempt to link against python27.lib (e.g. the release library) when linking against msvcrt debug library. Doing a debug build of LLDB with embedded python support now requires you to provide your own self-compiled debug version of python. 3) Don't import termios when initializing the interpreter. This is part of a larger effort to remove the dependency on termios since it is not available on Windows. This particular instance was unnecessary and unused. Reviewed by: Todd Fiala Differential Revision: http://reviews.llvm.org/D4441 llvm-svn: 212785
* Add better logging to the new Python-based SWIG generation scripts.Zachary Turner2014-07-101-10/+30
| | | | llvm-svn: 212759
* This creates a valid Python API for Windows, pending some issues. The ↵Deepak Panickal2014-07-011-0/+624
changes included are - - Ported the SWIG wrapper shell scripts to Python so that they would work on Windows too along with other platforms - Updated CMake handling to fix SWIG errors and manage sym-linking on Windows to liblldb.dll - More build fixes for Windows The pending issues are that two Python modules, termios and pexpect are not available on Windows. These are currently required for the Python command interpreter to be used from within LLDB. llvm-svn: 212111
OpenPOWER on IntegriCloud