summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/finish-swig-Python-LLDB.sh
Commit message (Collapse)AuthorAgeFilesLines
* Add an helper class lldb.formatters.synth.PythonObjectSyntheticChildProviderEnrico Granata2016-08-301-0/+1
| | | | | | | | This class enables one to easily write a synthetic child provider by writing a class that returns pairs of names and primitive Python values - the base class then converts those into LLDB SBValues Comes with a test case llvm-svn: 280172
* Rename argdumper to lldb-argdumperTodd Fiala2015-10-291-5/+5
| | | | | | http://reviews.llvm.org/D14169 llvm-svn: 251616
* Fix argdumper build in cmake (OS X) after r228636Ilia K2015-02-171-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-22/+0
| | | | | | r228636" and r229159 "Fix build: make_symlink_darwin_debug passes 2 arguments into make_symlink, but it requires 4 arguments" llvm-svn: 229166
* Fix argdumper build in cmake (OS X) after r228636Ilia K2015-02-131-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+19
| | | | | | | | | | | | | 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
* This creates a valid Python API for Windows, pending some issues. The ↵Deepak Panickal2014-07-011-1/+1
| | | | | | | | | | | | | 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
* If CMake finds a python interpreter, use itEd Maste2014-04-241-3/+4
| | | | | | | | | | | | | The FreeBSD package building cluster installs e.g. 'python2.7', but no plain 'python' to avoid version-related issues. CMake's FindPythonInterp locates an interpreter with such a name and provides it in the PYTHON_EXECUTABLE variable. Use that if it's set, falling back to the original '/usr/bin/env python' otherwise. Patch by Brooks Davis in FreeBSD ports commit r352012 llvm-svn: 207122
* Adding a diagnose-nsstring commandEnrico Granata2013-05-301-1/+2
| | | | | | This should help us figure out issues with the NSString data formatter llvm-svn: 182972
* Rename unwind_diagnose.py to diagnose_unwind.py. ChangeJason Molenda2013-04-301-2/+5
| | | | | | | | | | | finish-swig-Python-LLDB.sh to create a new lldb.diagnose subdirectory in the LLDB framework; the first diagnostic command in this directory is diagnose-unwind. There may be others added in the future. Users can load these diagnostic tools into their session with "script import lldb.diagnose". llvm-svn: 180768
* Forgot to include the diagnose_unwind.py script in the initialization ofJason Molenda2013-04-231-1/+2
| | | | | | the lldb.macosx folder. llvm-svn: 180078
* This checkin removes the last Cocoa formatters that were implemented in ↵Enrico Granata2013-03-191-27/+0
| | | | | | Python and reimplements them in C++. The Python Cocoa formatters are not shipped as part of LLDB anymore, but still exist in the source repository for user reference. Python formatters still exist for STL classes and users can still define their own Python formatters llvm-svn: 177366
* Use printf instead of echo -n (the latter won't work on OS X's /bin/sh)Filipe Cabecinhas2013-01-301-2/+2
| | | | llvm-svn: 173867
* Makefile patches from Charles Davis and Daniel Malea (+ one or two tweaks).Filipe Cabecinhas2012-11-011-10/+34
| | | | llvm-svn: 167242
* Patch from Dan Malea to get the Bourne shells scripts to run cleanly on ↵Jason Molenda2012-09-271-11/+11
| | | | | | Ubuntu. llvm-svn: 164801
* Fixed some problems with SWIG bindings.Filipe Cabecinhas2012-09-141-7/+4
| | | | | | | | | | This may (but shouldn't) break Linux (but I tested and it still worked on FreeBSD). The same shell scripts are now used on Xcode and Makefiles, for generating the SWIG bindings. Some compatibility fixes were applied, too (python path, bash-isms, etc). llvm-svn: 163912
* Fix the comments about LLDB_DISABLE_PYTHON in the python swig shell scripts ↵Jim Ingham2012-05-261-2/+4
| | | | | | to be more clear. llvm-svn: 157506
* Fix missing Resources/Python directory for macosx build.Johnny Chen2012-05-241-2/+2
| | | | llvm-svn: 157405
* Remove the "-x" from the finish-swig-Python-LLDB.sh shell options so it ↵Greg Clayton2012-04-251-1/+1
| | | | | | | | doesn't print out all of the commands when executing the shell script. Cleaned up the lldb.utils.symbolication, lldb.macosx.heap and lldb.macosx.crashlog. The lldb.macosx.heap can now build a dylib for the current triple into a temp directory and use it from there. llvm-svn: 155577
* Returning data formatters to their previous working condition - Plus fixing ↵Enrico Granata2012-04-251-0/+4
| | | | | | an issue that was preventing Python oneliners from executing llvm-svn: 155563
* Now that we have an LLDB package, make the "lldb.macosx.crashlog" module ↵Greg Clayton2012-04-251-5/+17
| | | | | | work with all of the new module paths. llvm-svn: 155528
* Ensure that lldb/runtime is not a dead point in the Python package hierarchy ↵Enrico Granata2012-04-251-2/+6
| | | | | | - This is a first preliminary step in fixing data formatters after Greg's changes to the Python resources on-disk layout llvm-svn: 155525
* Maked LLDB into a package so we can import things without poluting the ↵Greg Clayton2012-04-251-409/+100
| | | | | | | | global namespace. Enrico will follow this up with fixing the data formatter test cases that are failing. llvm-svn: 155514
* Part 1 of a series of fixes meant to improve reliability and increase ease ↵Enrico Granata2012-03-291-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of bug fixing for data formatter issues. We are introducing a new Logger class on the Python side. This has the same purpose, but is unrelated, to the C++ logging facility The Pythonic logging can be enabled by using the following scripting commands: (lldb) script Logger._lldb_formatters_debug_level = {0,1,2,...} 0 = no logging 1 = do log 2 = flush after logging each line - slower but safer 3 or more = each time a Logger is constructed, log the function that has created it more log levels may be added, each one being more log-active than the previous by default, the log output will come out on your screen, to direct it to a file: (lldb) script Logger._lldb_formatters_debug_filename = 'filename' that will make the output go to the file - set to None to disable the file output and get screen logging back Logging has been enabled for the C++ STL formatters and for Cocoa class NSData - more logging will follow synthetic children providers for classes list and map (both libstdcpp and libcxx) now have internal capping for safety reasons this will fix crashers where a malformed list or map would not ever meet our termination conditions to set the cap to a different value: (lldb) script {gnu_libstdcpp|libcxx}.{map|list}_capping_size = new_cap (by default, it is 255) you can optionally disable the loop detection algorithm for lists (lldb) script {gnu_libstdcpp|libcxx}.list_uses_loop_detector = False llvm-svn: 153676
* adding a summary for Objective-C type 'Class'Enrico Granata2012-03-271-0/+14
| | | | llvm-svn: 153541
* Added formatters for libc++ (http://libcxx.llvm.org):Enrico Granata2012-03-121-0/+14
| | | | | | | | | | | | | std::string has a summary provider std::vector std::list and std::map have both a summary and a synthetic children provider Given the usage of a custom namespace (std::__1::classname) for the implementation of libc++, we keep both libstdcpp and libc++ formatters enabled at the same time since that raises no conflicts and enabled for seamless transition between the two The formatters for libc++ reside in a libcxx category, and are loaded from libcxx.py (to be found in examples/synthetic) The formatters-stl test cases have been divided to be separate for libcxx and libstdcpp. This separation is necessary because (a) we need different compiler flags for libc++ than for libstdcpp (b) libc++ inlines a lot more than libstdcpp and some code changes were required to accommodate this difference llvm-svn: 152570
* Copying a new file required for the updated formatters to work into ↵Enrico Granata2012-03-051-0/+14
| | | | | | LLDB.framework llvm-svn: 152053
* added a new formatter for CF(Mutable)BitVectorEnrico Granata2012-03-031-0/+14
| | | | | | | | fixed a few potential NULL-pointer derefs in ValueObject we have a way to provide docstrings for properties we add to the SWIG layer - a few of these properties have a docstring already, more will come in future commits added a new bunch of properties to SBData to make it more natural and Python-like to access the data they contain llvm-svn: 151962
* (a) adding formatters for:Enrico Granata2012-03-021-0/+14
| | | | | | | | NSTimeZone and CFTimeZonRef SEL and related types CFGregorianDate llvm-svn: 151866
* (a) adding an introspection formatter for NS(Mutable)IndexSetEnrico Granata2012-03-011-0/+14
| | | | | | | | | (b) fixes and improvements to the formatters for NSDate and NSString (c) adding an introspection formatter for NSCountedSet (d) making the Objective-C formatters test cases pass on both 64 and 32 bit one of the test cases is marked as expected failure on i386 - support needs to be added to the LLDB core for it to pass llvm-svn: 151826
* This commit:Enrico Granata2012-02-291-0/+14
| | | | | | | | | | | | | a) adds a Python summary provider for NSDate b) changes the initialization for ScriptInterpreter so that we are not passing a bulk of Python-specific function pointers around c) provides a new ScriptInterpreterObject class that allows for ref-count safe wrapping of scripting objects on the C++ side d) contains much needed performance improvements: 1) the pointer to the Python function generating a scripted summary is now cached instead of looked up every time 2) redundant memory reads in the Python ObjC runtime wrapper are eliminated 3) summaries now use the m_summary_str in ValueObject to store their data instead of passing around ( == copying) an std::string object e) contains other minor fixes, such as adding descriptive error messages for some cases of summary generation failure llvm-svn: 151703
* This patch provides a set of formatters for most of the commonly used Cocoa ↵Enrico Granata2012-02-231-1/+240
| | | | | | | | | | classes. The formatter for NSString is an improved version of the one previously shipped as an example, the others are new in design and implementation. A more robust and OO-compliant Objective-C runtime wrapper is provided for runtime versions 1 and 2 on 32 and 64 bit. The formatters are contained in a category named "AppKit", which is not enabled at startup. llvm-svn: 151299
* This commit provides a new default summary for Objective-C boolean ↵Enrico Granata2012-01-311-0/+15
| | | | | | variables, which shows YES or NO instead of the character value. A new category named objc is added to contain this summary provider. Any future Objective-C related formatters would probably fit here llvm-svn: 149388
* Fixed the Xcode project building of LLVM to be a bit more user friendly:Greg Clayton2011-11-041-0/+6
| | | | | | | | | | | | | | | | | | | - If you download and build the sources in the Xcode project, x86_64 builds by default using the "llvm.zip" checkpointed LLVM. - If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the Xcode project will download the right LLVM sources and build them from scratch - If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib" directory, we will use the sources you have placed in the LLDB directory. Python can now be disabled for platforms that don't support it. Changed the way the libllvmclang.a files get used. They now all get built into arch specific directories and never get merged into universal binaries as this was causing issues where you would have to go and delete the file if you wanted to build an extra architecture slice. llvm-svn: 143678
* First round of code cleanups:Enrico Granata2011-08-171-5/+5
| | | | | | | | | | | | | | | | | | - all instances of "vobj" have been renamed to "valobj" - class Debugger::Formatting has been renamed to DataVisualization (defined in FormatManager.h/cpp) The interface to this class has not changed - FormatCategory now uses ConstString's as keys to the navigators instead of repeatedly casting from ConstString to const char* and back all the time Next step is making the same happen for categories themselves - category gnu-libstdc++ is defined in the constructor for a FormatManager The source code for it is defined in gnu_libstdcpp.py, drawn from examples/synthetic at compile time All references to previous 'osxcpp' name have been removed from both code and file names Functional changes: - the name of the option to use a summary string for 'type summary add' has changed from the previous --format-string to the new --summary-string. It is expected that the short option will change from -f to -s, and -s for --python-script will become -o llvm-svn: 137886
* New category "gnu-libstdc++" provides summary for std::string and synthetic ↵Enrico Granata2011-08-171-0/+15
| | | | | | | | | | children for types std::map, std::list and std::vector The category is enabled by default. If you run into issues with it, disable it and the previous behavior of LLDB is restored ** This is a temporary solution. The general solution to having formatters pulled in at startup should involve going through the Platform. Fixed an issue in type synthetic list where a category with synthetic providers in it was not shown if all the providers were regex-based llvm-svn: 137850
* Parameterize the shell scripts for creating and copying the python andCaroline Tice2010-06-161-17/+141
| | | | | | | | other script files around, so they can be run from outside Xcode. Also, check the current OS, and only try to use the framework structure stuff on Darwin systems. llvm-svn: 106132
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-081-0/+45
llvm-svn: 105619
OpenPOWER on IntegriCloud