summaryrefslogtreecommitdiffstats
path: root/lldb/examples/synthetic
Commit message (Collapse)AuthorAgeFilesLines
* Fixing a problem where some uninitialized cases of vectors could cause ↵Enrico Granata2012-04-101-1/+6
| | | | | | diagnostic output from the synthetic children providers - this time the fix should work llvm-svn: 154361
* Making sure the count on synthetic providers is always setup - This should ↵Enrico Granata2012-03-312-4/+8
| | | | | | prevent errors about count being undefined from showing up llvm-svn: 153791
* Added some logging to STL synthetic children providers - this should help us ↵Enrico Granata2012-03-302-2/+20
| | | | | | catch problems; more logging might/will be added as needed llvm-svn: 153750
* Part 1 of a series of fixes meant to improve reliability and increase ease ↵Enrico Granata2012-03-292-4/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Synthetic values are now automatically enabled and active by default. ↵Enrico Granata2012-03-272-12/+30
| | | | | | | | | | | | SBValue is set up to always wrap a synthetic value when one is available. A new setting enable-synthetic-value is provided on the target to disable this behavior. There also is a new GetNonSyntheticValue() API call on SBValue to go back from synthetic to non-synthetic. There is no call to go from non-synthetic to synthetic. The test suite has been changed accordingly. Fallout from changes to type searching: an hack has to be played to make it possible to use maps that contain std::string due to the special name replacement operated by clang Fixing a test case that was using libstdcpp instead of libc++ - caught as a consequence of said changes to type searching llvm-svn: 153495
* Massive enumeration name changes: a number of enums in ValueObject were not ↵Enrico Granata2012-03-192-6/+3
| | | | | | | | | | | | | | | | | | following the naming pattern Changes to synthetic children: - the update(self): function can now (optionally) return a value - if it returns boolean value True, ValueObjectSyntheticFilter will not clear its caches across stop-points this should allow better performance for Python-based synthetic children when one can be sure that the child ValueObjects have not changed - making a difference between a synthetic VO and a VO with a synthetic value: now a ValueObjectSyntheticFilter will not return itself as its own synthetic value, but will (correctly) claim to itself be synthetic - cleared up the internal synthetic children architecture to make a more consistent use of pointers and references instead of shared pointers when possible - major cleanup of unnecessary #include, data and functions in ValueObjectSyntheticFilter itself - removed the SyntheticValueType enum and replaced it with a plain boolean (to which it was equivalent in the first place) Some clean ups to the summary generation code Centralized the code that clears out user-visible strings and data in ValueObject More efficient summaries for libc++ containers llvm-svn: 153061
* Adding a new example of synthetic children providerEnrico Granata2012-03-172-0/+168
| | | | llvm-svn: 152970
* Deleting obsolete filesEnrico Granata2012-03-165-612/+0
| | | | llvm-svn: 152888
* Added formatters for libc++ (http://libcxx.llvm.org):Enrico Granata2012-03-121-0/+481
| | | | | | | | | | | | | 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
* Changed ValueObject to use a dedicated ChildrenManager class to store its ↵Enrico Granata2012-03-091-1/+55
| | | | | | | | | | | | | | | children, instead of an std::vector This solves an issue where a ValueObject was getting a wrong children count (usually, a huge value) and trying to resize the vector of children to fit that many ValueObject* Added a loop detection algorithm to the synthetic children provider for std::list Added a few more checks to the synthetic children provider for std::vector Both std::list and std::vector's synthetic children providers now cache the count of children instead of recomputing it every time std::map has a field that stores the count, so there is little need to cache it on our side llvm-svn: 152371
* fixing comment to reflect that currentversion of OSX works with our STL ↵Enrico Granata2012-02-081-1/+1
| | | | | | formatters llvm-svn: 150085
* Fixing issues where synthetic children providers for STL containers ↵Enrico Granata2012-02-031-64/+41
| | | | | | std::list and std::map where not doing their job properly llvm-svn: 149700
* Objective-C runtime wrapperEnrico Granata2011-09-091-0/+128
| | | | llvm-svn: 139372
* More documentation changes (WIP)Enrico Granata2011-08-241-10/+34
| | | | llvm-svn: 138421
* Fixing a startup errorEnrico Granata2011-08-221-1/+1
| | | | llvm-svn: 138237
* Exception-awareness for gnu_libstdcpp formatters ; Documentation updateEnrico Granata2011-08-222-100/+136
| | | | llvm-svn: 138236
* First round of code cleanups:Enrico Granata2011-08-171-0/+231
| | | | | | | | | | | | | | | | | | - 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
* CFString.py now shows contents in a more NSString-like way (e.g. you get ↵Enrico Granata2011-08-091-9/+8
| | | | | | | | | | @"Hello" instead of "Hello") new --raw-output (-R) option to frame variable prevents using summaries and synthetic children other future formatting enhancements will be excluded by using the -R option test case enhanced to check that -R works correctly llvm-svn: 137185
* changing CFString.py to reflect the new behavior of CreateValueFromAddressEnrico Granata2011-08-041-1/+1
| | | | llvm-svn: 136887
* copying std:: SynthProviders in examples/syntheticEnrico Granata2011-08-043-74/+76
| | | | llvm-svn: 136863
* APIs to GetValueAsSigned/Unsigned() in SBValue now also accept an SBError ↵Enrico Granata2011-08-044-40/+77
| | | | | | | | | parameter to give more info about any problem The synthetic children providers now use the new (safer) APIs to get the values of objects As a side effect, fixed an issue in ValueObject where ResolveValue() was not always updating the value before reading it llvm-svn: 136861
* Cleaned up the NSString summary formatter to not print "<invalid object>" whenGreg Clayton2011-07-301-12/+29
| | | | | | | we have a nil NSString *. Also added blank lines between functions in the CFString.py files. llvm-svn: 136554
* changes in the new GetMinimumLanguages() ; robustness improvements in the ↵Enrico Granata2011-07-291-1/+16
| | | | | | CFStringSynthProvider object ; made a CFString_SummaryProvider function you can use if all you care about is the summary string for your NSString objects llvm-svn: 136544
* new synthetic children provider for CFString and related classes ; test case ↵Enrico Granata2011-07-291-0/+206
| | | | | | for it llvm-svn: 136525
* Public API changes:Enrico Granata2011-07-293-0/+189
- Completely new implementation of SBType - Various enhancements in several other classes Python synthetic children providers for std::vector<T>, std::list<T> and std::map<K,V>: - these return the actual elements into the container as the children of the container - basic template name parsing that works (hopefully) on both Clang and GCC - find them in examples/synthetic and in the test suite in functionalities/data-formatter/data-formatter-python-synth New summary string token ${svar : - the syntax is just the same as in ${var but this new token lets you read the values coming from the synthetic children provider instead of the actual children - Python providers above provide a synthetic child len that returns the number of elements into the container Full bug fix for the issue in which getting byte size for a non-complete type would crash LLDB Several other fixes, including: - inverted the order of arguments in the ClangASTType constructor - EvaluationPoint now only returns SharedPointer's to Target and Process - the help text for several type subcommands now correctly indicates argument-less options as such llvm-svn: 136504
OpenPOWER on IntegriCloud