summaryrefslogtreecommitdiffstats
path: root/lldb/examples/summaries/cocoa
Commit message (Collapse)AuthorAgeFilesLines
* Python 2/3 compat: str vs basestringSerge Guelton2019-03-258-0/+40
| | | | | | Differential Revision: https://reviews.llvm.org/D59589 llvm-svn: 356908
* Python 2/3 compat: unichr vs chrSerge Guelton2019-03-251-0/+4
| | | | llvm-svn: 356904
* Python 2/3 compatibility: from __future__ import print_functionSerge Guelton2019-03-212-3/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D59580 llvm-svn: 356695
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1922-66/+66
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0623-3316/+3858
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Py3'ify some of the examples that get run at startup.Zachary Turner2015-10-191-1/+1
| | | | | | | | | | Even though these are under examples/, they actually get loaded when LLDB starts up during initialization of ScriptInterpreterPython. There's obviously some kind of layering issue here (and comments in the code even point to that as well), but for now just make them py3 compatible. llvm-svn: 250710
* Fix typos.Bruce Mitchener2015-09-221-1/+1
| | | | | | | | | | | | Summary: Another round of minor typo fixes. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13026 llvm-svn: 248243
* Fix some typos:Sylvestre Ledru2014-08-111-1/+1
| | | | | | | | * transfered => transferred * unkown => unknown * sucessfully => successfully llvm-svn: 215367
* This checkin removes the last Cocoa formatters that were implemented in ↵Enrico Granata2013-03-191-1/+2
| | | | | | 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
* NS(Mutable)IndexSet formatter moves from Python to C++Enrico Granata2013-03-161-1/+2
| | | | llvm-svn: 177217
* Converting more data formatters to C++ - NSBundle, CFBinaryHeap, NSMachPort ↵Enrico Granata2013-03-165-5/+10
| | | | | | and NSNotification llvm-svn: 177213
* Quick fix for the libc++ std::map synthetic children providerEnrico Granata2013-02-091-2/+2
| | | | | | | | If you try to access any child > 0 without having touched child 0, LLDB won't be able to reconstruct type information from the debug info. Previously, we would fail. Now, we simply go fetch child 0 and then come back. llvm-svn: 174795
* <rdar://problem/12552374> & <rdar://problem/13100674>Enrico Granata2013-01-301-12/+0
| | | | | | The vtable pointer field is not necessarily a pointer and hence cannot be used for validation llvm-svn: 173947
* Replacing reference to radar number with svn revisionEnrico Granata2013-01-161-1/+1
| | | | llvm-svn: 172641
* Greg created a new API on SBProcess to get an ID that is guaranteed to be ↵Enrico Granata2013-01-161-1/+1
| | | | | | | | unique even in situations where underlying platforms would actually duplicate or hardcode PIDs The Python data formatters use a per-process cache that was previously keying off the PID. Moving that to be based on this new notion of unique ID. llvm-svn: 172633
* Tweaking a comment in the NSURL formatter for correctness - the code was ↵Enrico Granata2012-12-181-1/+4
| | | | | | doing the right thing, but the comment was highly misleading llvm-svn: 170441
* <rdar://problem/12817233>Enrico Granata2012-12-101-2/+2
| | | | | | Change the wording of NSNumber summary from absurd value to unexpected value when a tagged pointer shows up that does not match our knowledge of the internals llvm-svn: 169751
* Changing the NSDate data formatter to use GetData().uint64[] instead of ↵Enrico Granata2012-10-241-3/+3
| | | | | | relying on SBValue.GetValueAsUnsigned() to reinterpret a double as a uint64_t llvm-svn: 166610
* <rdar://problem/12426557> Fixing the NSIndexSet data formatterEnrico Granata2012-10-051-11/+18
| | | | llvm-svn: 165341
* <rdar://problem/11398693> Making sure we do not attempt to run code on ↵Enrico Granata2012-09-181-3/+5
| | | | | | zombie objects when attempting to format them llvm-svn: 164156
* Fix a potential issue where data formatters can get confused over malformed ↵Enrico Granata2012-09-181-1/+4
| | | | | | UUIDs llvm-svn: 164151
* <rdar://problem/12161825> Rephrase formatter for NSIndexSet in terms of ↵Enrico Granata2012-09-181-1/+1
| | | | | | indexes instead of objects llvm-svn: 164149
* <rdar://problem/12068655> Make sure [NSDate distantPast] is formatted correctlyEnrico Granata2012-09-041-0/+4
| | | | llvm-svn: 163162
* Editing a comment to make sure people know not to blame CFString.py for ↵Enrico Granata2012-09-041-2/+2
| | | | | | CFString summary errors llvm-svn: 163157
* <rdar://problem/11485744> Implement important data formatters in C++. Have ↵Enrico Granata2012-09-044-4/+8
| | | | | | the Objective-C language runtime plugin expose class descriptors objects akin to the objc_runtime.py Pythonic implementation. Rewrite the data formatters for some core Cocoa classes in C++ instead of Python. llvm-svn: 163155
* Make the objc-runtime work with Python 2.6Filipe Cabecinhas2012-08-011-8/+20
| | | | llvm-svn: 161111
* <rdar://problem/11753405> Making sure we deal correctly with signed NSNumber ↵Enrico Granata2012-07-131-10/+12
| | | | | | values llvm-svn: 160179
* Fixes for performance to data formatters - Python < 3.0 is much slower when ↵Enrico Granata2012-05-211-114/+110
| | | | | | using True/False as compared to 1/0 for logical values. Wexploit this to our advantage. Other minor tweaks llvm-svn: 157209
* Optimizations to the Python ObjC formatters - Benchmarking infrastructureEnrico Granata2012-05-182-3/+27
| | | | llvm-svn: 157066
* Fixing a bug where the summary for certain NSStrings was being returned as ↵Enrico Granata2012-05-151-4/+9
| | | | | | empty in spite of the string actually having a content llvm-svn: 156793
* Automatically enabling the Cocoa formatter categories for command-line LLDB. ↵Enrico Granata2012-04-261-1/+1
| | | | | | Previously, the categories were filled in but disabled by default. Tweaking test cases appropriately to keep working and do the right thing llvm-svn: 155605
* Fixing a typo in the NSArray data formatterEnrico Granata2012-04-251-1/+1
| | | | llvm-svn: 155586
* Returning data formatters to their previous working condition - Plus fixing ↵Enrico Granata2012-04-2517-34/+34
| | | | | | an issue that was preventing Python oneliners from executing llvm-svn: 155563
* Making the Cocoa formatters comply with the new on-disk layout of the Python ↵Enrico Granata2012-04-2519-328/+328
| | | | | | resources - This is one of the steps towards making the data formatters work again llvm-svn: 155526
* Maked LLDB into a package so we can import things without poluting the ↵Greg Clayton2012-04-251-133/+0
| | | | | | | | global namespace. Enrico will follow this up with fixing the data formatter test cases that are failing. llvm-svn: 155514
* One last syntax error fixEnrico Granata2012-04-021-1/+1
| | | | llvm-svn: 153911
* Fixing syntax typos in Python formattersEnrico Granata2012-04-023-6/+6
| | | | llvm-svn: 153910
* Removing some instances of str(SBValue)Enrico Granata2012-04-023-6/+6
| | | | llvm-svn: 153899
* Logging for data formatters.Enrico Granata2012-04-0217-3/+352
| | | | llvm-svn: 153878
* Fixing a whole class of crashers and potential crashers related to data ↵Enrico Granata2012-03-3014-14/+14
| | | | | | formatters eating up all the stack when an unknown class has to be summarized ; this should make the whole Objective-C summaries more stable llvm-svn: 153712
* Part 1 of a series of fixes meant to improve reliability and increase ease ↵Enrico Granata2012-03-292-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixing an issue where Unicode characters in an NSString were printed as ↵Enrico Granata2012-03-291-8/+16
| | | | | | escape sequences by the summary provider shipping with LLDB - Added relevant test case code. Bonus points for identifying the source of the quotes :-) llvm-svn: 153624
* Adding missing fileEnrico Granata2012-03-281-0/+19
| | | | llvm-svn: 153559
* adding a summary for Objective-C type 'Class'Enrico Granata2012-03-271-0/+6
| | | | llvm-svn: 153541
* The Cocoa formatters now provide error messages for many of the common ↵Enrico Granata2012-03-1321-448/+543
| | | | | | things-went-wrong situations. Previously they would say nothing or log failures to the Python console llvm-svn: 152673
* Changed several of the Cocoa formatters to match the output style that Xcode ↵Enrico Granata2012-03-139-15/+48
| | | | | | | | | | | uses internally to provide summaries This has been done for those summaries where the difference is only cosmetic (e.g. naming things as items instead of values, ...) The LLDB output style has been preserved when it provides more information (e.g. telling the type as well as the value of an NSNumber) Test cases have been updated to reflect the updated output style where necessary llvm-svn: 152592
* Fixing a problem with the NSSet summary provider; plus, providing a further ↵Enrico Granata2012-03-092-2/+6
| | | | | | optimization to the whole Cocoa formatters infrastructure llvm-svn: 152423
* the formatter for NSNotification was not being initialized correctlyEnrico Granata2012-03-091-3/+4
| | | | llvm-svn: 152358
* Fixing some of the new Python formatters to report '1 object' instead of '1 ↵Enrico Granata2012-03-077-20/+34
| | | | | | objects' llvm-svn: 152186
* Several performance-oriented changes to the introspecting data formatters:Enrico Granata2012-03-0519-750/+594
| | | | | | | | | | | | (a) the SystemParameters object is now passed around to the formatters; doing so enables the formatters to reuse computed values for things such as pointer-size and endianness instead of repeatedly computing these on their own (b) replacing the global ISA cache with a per-process one (c) providing a per-process types cache where each formatter can store the types it needs to operate, and be sure to find them the next time without recalculating them this also enables formatters to share types if they agree on a local naming convention (d) lazy fetching of data from Objective-C runtime data structures data is fetched as needed and we stop reading as soon as we determine that an ISA is actually garbage llvm-svn: 152052
OpenPOWER on IntegriCloud