summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Language
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for additional NSArray formattersEnrico Granata2016-04-112-2/+41
| | | | llvm-svn: 265979
* Add a formatter for zero-sized NSDataEnrico Granata2016-04-111-0/+4
| | | | llvm-svn: 265978
* Remove what I believe are the last known instances of formatters that run codeEnrico Granata2016-04-082-44/+22
| | | | llvm-svn: 265865
* Remove even more of the data formatters that silently run codeEnrico Granata2016-04-083-20/+0
| | | | | | Fixes <rdar://problem/25629755> llvm-svn: 265849
* Remove more of the code-running ObjC data formatter supportEnrico Granata2016-04-013-139/+40
| | | | llvm-svn: 265181
* On some platforms, the compiler is allowed to assume that BOOL == bool. On ↵Enrico Granata2016-03-151-6/+12
| | | | | | | | | | | | others, BOOL == signed char. This can cause differences in which bit patterns end up meaning YES or NO. In general, however, 0 == NO and 1 == YES. To keep it simple, LLDB will now show "YES" and "NO" only for 1 and 0 respectively, and format other values as the plain numeric value instead. Fixes rdar://24809994 llvm-svn: 263604
* Make it so that the data formatter for NSError can see through a variable of ↵Enrico Granata2016-03-152-26/+34
| | | | | | type NSError**. Fixes rdar://25060684 llvm-svn: 263603
* Fix warning in NSDictionary.cppPavel Labath2016-03-011-1/+1
| | | | llvm-svn: 262322
* Fix a typo in my previous commit. This would cause mutable NSArrays to show ↵Enrico Granata2016-02-291-1/+1
| | | | | | up empty llvm-svn: 262260
* Add an LLDB data formatter for single-element NSArray and NSDictionary Cocoa ↵Enrico Granata2016-02-293-25/+248
| | | | | | | | containers Fixes rdar://23715118 llvm-svn: 262254
* Fix Clang-tidy modernize-use-nullptr warnings in source/Plugins/Language; ↵Eugene Zelenko2016-02-2914-273/+248
| | | | | | other minor fixes. llvm-svn: 262246
* Fix compiler warnings in the java codePavel Labath2016-02-291-1/+1
| | | | llvm-svn: 262214
* Add a set of new plugins to handle Java debuggingTamas Berghammer2016-02-266-0/+269
| | | | | | | | | The purpose of these plugins is to make LLDB capable of debugging java code JIT-ed by the android runtime. Differential revision: http://reviews.llvm.org/D17616 llvm-svn: 262015
* Fix all of the unannotated switch cases to annotate the fall through or do ↵Greg Clayton2016-02-261-0/+1
| | | | | | the right thing and break. llvm-svn: 261950
* Remove an unnecessary includeEnrico Granata2016-02-121-1/+0
| | | | llvm-svn: 260761
* Data formatter support for libc++ std::atomic<T>Enrico Granata2016-02-124-3/+156
| | | | | | | | | | On libc++ std::atomic is a fairly simple data type (layout wise, at least), wrapping actual contents in a member variable named "__a_" All the formatters are doing is "peel away" this intermediate layer and exposing user data as direct children or values of the std::atomic root variable Fixes rdar://24329405 llvm-svn: 260752
* The data formatters for NSArray, NSDictionary and (only partially) NSSet ↵Enrico Granata2016-02-123-158/+7
| | | | | | | | | | | | | | | | | contain logic to inspect the objects without running code. However, they also contain fallback logic that - in cases where LLDB can't recognize the specific subclass - actually does run code in order to inspect those objects. The argument for this logic was that these data types are critical enough that the risk of getting it wrong is outweighed by the advantage of always providing accurate child information. Practical experience however shows that "po" - a code running data-inspection command - is quite frequently used, and not considered burdensome by users. As such, this makes the code-running fallback in the data formatters a risk that carries very little actual reward. Also, unlike the time this code was originally written, we now have accurate class information for Objective-C, and thus we are less likely to improperly identify classes. This commit removes support for the code-running fallback, and aligns the data formatters for NSArray, NSDictionary and NSSet to the general no-code-running behavior of other data formatters. While it is possible for us to add support for some subclasses that are now no longer covered by static inspection alone, this is beyond the scope of this commit. llvm-svn: 260664
* Remove autoconf support from source directories.Eugene Zelenko2016-01-284-56/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* Better scheme to lookup alternate mangled name when looking up function address.Siva Chandra2016-01-072-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change is relevant for inferiors compiled with GCC. GCC does not emit complete debug info for std::basic_string<...>, and consequently, Clang (the LLDB compiler) does not generate correct mangled names for certain functions. This change removes the hard-coded alternate names in ItaniumABILanguageRuntime.cpp. Before the hard-coded names were put in ItaniumABILanguageRuntime.cpp, one could not evaluate std::string methods (ex. std::string::length). After putting in the hard-coded names, one could evaluate them. However, it did not still enable one to call methods on, say for example, std::vector<string>. This change makes that possible. There is some amount of incompleteness in this change. Consider the following example: std::string hello("hello"), world("world"); std::map<std::string, std::string> m; m[hello] = world; One can still not evaluate the expression "m[hello]" in LLDB. Will address this issue in another pass. Reviewers: jingham, vharron, evgeny777, spyffe, dawn Subscribers: clayborg, dawn, lldb-commits Differential Revision: http://reviews.llvm.org/D12809 llvm-svn: 257113
* Turns out, many people define structs named Point that do not share the same ↵Enrico Granata2015-12-181-1/+1
| | | | | | names that this formatter uses for fields; use the {} syntax to make it so that a failure to parse the summary doesn't cause the entire printout to fail llvm-svn: 256042
* Reduce memory traffic in ConstString in the std::map formatterEnrico Granata2015-12-041-6/+14
| | | | llvm-svn: 254787
* Do the same iterator caching optimization for std::mapEnrico Granata2015-12-041-48/+64
| | | | | | This brings the timings down for 1500 elements from 166 to 2 seconds on my machine - if I can math correctly, that is a 98% improvement llvm-svn: 254781
* Cache the incremental iterators as you traverse the list, so that you don't ↵Enrico Granata2015-12-041-64/+79
| | | | | | | | | | have to keep recomputing them If memory turns out to be a problem, which I don't think it will in practice because all these ValueObjects, we'd be keeping alive anyway, I can always resort to caching the farthest-most iterator only This gains us an order of magnitude in my benchmark, cutting the time to traverse a 1500-elements list from 22 seconds down to 2 llvm-svn: 254762
* Improve the std::list data formatter to not need to calculate indices for ↵Enrico Granata2015-12-041-3/+6
| | | | | | | | every loop iteration This saves about 5 seconds on a 1500 elements list from my local estimates llvm-svn: 254757
* Introduce a way for Languages to specify whether values of "reference types" ↵Enrico Granata2015-11-102-0/+15
| | | | | | | | | | are "nil" (not pointing to anything) or uninitialized (never made to point at anything) This latter determination may or may not be possible on a per-language basis; and neither is mandatory to implement for any language Use this knowledge in the ValueObjectPrinter to generalize the notion of IsObjCNil() and the respective printout llvm-svn: 252663
* Fix some Clang-tidy warnings and formatting in recently added code.Eugene Zelenko2015-11-073-48/+47
| | | | | | | | | | | Fixed Clang-tidy warnings: * modernize-use-override; * modernize-use-nullptr; * modernize-use-default; * readability-simplify-boolean-expr. llvm-svn: 252374
* Add data formatters for NSError and NSExceptionEnrico Granata2015-11-065-0/+457
| | | | llvm-svn: 252269
* Add go data formatters.Ryan Brown2015-11-057-0/+448
| | | | | | Differential Revision: http://reviews.llvm.org/D13878 llvm-svn: 252109
* Fix an issue where LLDB would truncate summaries for string types without ↵Enrico Granata2015-11-041-4/+21
| | | | | | producing any evidence thereof llvm-svn: 252018
* Remove two #if0ed regions of code that we were using for an experiment but ↵Enrico Granata2015-10-291-14/+0
| | | | | | don't really want llvm-svn: 251670
* Do not accept nullptr descriptions as valid summaries to be printedEnrico Granata2015-10-291-2/+7
| | | | llvm-svn: 251663
* Change Target::EvaluateExpression to take an ExecutionContextScope * rather ↵Jim Ingham2015-10-282-0/+2
| | | | | | | | | | | | | | | | than a StackFrame * (StackFrame is an ExecutionContextScope.) That allows you to call an expression on a particular Thread, but not using the context of any particular frame. That in turn is useful for injecting utility functions that don't actually depend on locals/self/etc of the current frame. I also had to include StackFrame.h in a couple of places so the compiler knew how to downcast StackFrame to ExecutionContextScope. <rdar://problem/22852953> llvm-svn: 251564
* Fix MSVC build after r251402Tamas Berghammer2015-10-271-1/+2
| | | | llvm-svn: 251403
* Some minor improvements on the symtab parsing codeTamas Berghammer2015-10-271-25/+45
| | | | | | | | | | | | | | | * Remove an unneccessary re-computaion on arch spec from the ELF file * Use a local cache to optimize name based section lookups in symtab parsing * Optimize C++ method basename validation with replacing a regex with hand written code These modifications reduce the time required to parse the symtab from large applications by ~25% (tested with LLDB as inferior) Differential revision: http://reviews.llvm.org/D14088 llvm-svn: 251402
* Fix libstdc++ data formatters on Ubuntu 15.10 x86_64Todd Fiala2015-10-223-7/+157
| | | | | | See http://reviews.llvm.org/D13964 for details. llvm-svn: 250965
* [DataFormatters] Make libc++ list loop detection linearPavel Labath2015-10-211-88/+113
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Loop detection code is being called before every element access. Although it tries to cache some of the data by remembering the loop-free initial segment, every time it needs to increase this segment, it will start from scratch. For the typical usage pattern, where one accesses the elements in order, the loop detection will need to be run after every access, resulting in quadratic behavior. This behavior is noticable even for the default 255 element limit. In this commit, I rewrite the algorithm to be truly incremental -- it maintains the state of its loop-detection runners between calls, and reuses them when it needs to check another segment. This way, each part of the list is scanned only once, resulting in linear behavior. Also note that I have changed the operator== of ListEntry to do the comparison based on the value() function (instead of relying on ValueObjectSP equality). In my experiments, I kept getting different ValueObjectSPs when going through the same element twice. Reviewers: granata.enrico Subscribers: lldb-commits, sivachandra Differential Revision: http://reviews.llvm.org/D13902 llvm-svn: 250890
* Rationalization of includes in the data formatters codeEnrico Granata2015-10-202-1/+4
| | | | llvm-svn: 250798
* Fix Clang-tidy modernize-use-override warnings in source/Plugins/Language; ↵Eugene Zelenko2015-10-2014-468/+480
| | | | | | | | other minor fixes. Differential Revision: http://reviews.llvm.org/D13876 llvm-svn: 250789
* Add a data formatter for __NSArray0, the type of empty arraysEnrico Granata2015-10-142-0/+74
| | | | llvm-svn: 250341
* This is the work I was building up to with my patches yesterdayEnrico Granata2015-10-079-95/+429
| | | | | | | | | Introduce the notion of Language-based formatter prefix/suffix This is meant for languages that share certain data types but present them in syntatically different ways, such that LLDB can now have language-based awareness of which of the syntax variations it has to present to the user when formatting those values This is goodness for new languages and interoperability, but is NFC for existing languages. As such, existing tests cover this llvm-svn: 249587
* Enable the StringPrinter to have prefixes that are strings instead of just a ↵Enrico Granata2015-10-073-14/+14
| | | | | | single character; and also introduce a comparable suffix mechanism llvm-svn: 249506
* Introduce a variant of GetSummaryAsCString() that takes a LanguageType ↵Enrico Granata2015-10-071-5/+5
| | | | | | | | argument, and use it when crafting summaries by running selectors This is the first in a series of commits that are meant to teach LLDB how to properly handle multi-language formatting of values llvm-svn: 249503
* Fix the CMake buildEnrico Granata2015-10-021-0/+1
| | | | llvm-svn: 249189
* Add hooks that enable NSSet, NSDictionary and NSString formatting to apply ↵Enrico Granata2015-10-029-389/+586
| | | | | | | | to other types beyond the well-known ones This is meant to support languages that can do some sort of bridging from<-->to these ObjC types via types that statically vend themselves as Cocoa types, but dynamically have an implementation that does not match any of our well-known types, but where an introspecting formatter can be vended by the bridged language llvm-svn: 249185
* Made GetScratchTypeSystemForLanguage return an error if desired.Sean Callanan2015-10-021-1/+1
| | | | | | | Also made it not store nullptrs in its TypeSystemMap, so it will retry to make the AST context if it errored out last time. llvm-svn: 249167
* Teach 'type lookup' to pull types from clang modules; also add a test caseEnrico Granata2015-10-021-16/+39
| | | | llvm-svn: 249117
* Fix Android build after r249047.Oleksiy Vyalov2015-10-011-1/+1
| | | | llvm-svn: 249055
* Add a 'type lookup' command. This command is meant to look up type ↵Enrico Granata2015-10-012-0/+91
| | | | | | | | | | information by name in a language-specific way. Currently, it only supports Objective-C - C++ types can be looked up through debug info via 'image lookup -t', whereas ObjC types via this command are looked up by runtime introspection This behavior is in line with type lookup's behavior in Xcode 7, but I am definitely open to feedback as to what makes the most sense here llvm-svn: 249047
* Fix evaluation of unicode character arrays (char16_t[] and char32_t[])Dawn Perchik2015-09-252-15/+20
| | | | | | | | | | | | | | | | Suppose we have the UTF-16 string: char16_t[] s = u"hello"; Before this patch, evaluating the string in lldb would get: (char16_t [6]) $0 = ([0] = U+0068 u'h', [1] = U+0065 u'e', [2] = U+006c u'l', [3] = U+006c u'l', [4] = U+006f u'o', [5] = U+0000 u'\0') After applying the patch, we now get: (char16_t [6]) $0 = u"hello" Patch from evgeny.leviant@gmail.com Reviewed by: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13053 llvm-svn: 248555
* Rename clang_type -> compiler_type for variables.Bruce Mitchener2015-09-242-14/+14
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13102 llvm-svn: 248461
OpenPOWER on IntegriCloud