llvm-project/lldb/source/Plugins/Language/ObjC
Enrico Granata 2543d29048 The data formatters for NSArray, NSDictionary and (only partially) NSSet 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
2016-02-12 07:50:15 +00:00
..
CF.cpp Change Target::EvaluateExpression to take an ExecutionContextScope * rather than a 2015-10-28 22:23:17 +00:00
CF.h Move Objective-C data formatters to the Objective-C language plugin where they belong 2015-09-14 22:18:32 +00:00
CMakeLists.txt Add data formatters for NSError and NSException 2015-11-06 02:43:32 +00:00
Cocoa.cpp Do not accept nullptr descriptions as valid summaries to be printed 2015-10-29 22:29:06 +00:00
Cocoa.h Add data formatters for NSError and NSException 2015-11-06 02:43:32 +00:00
CoreMedia.cpp Made GetScratchTypeSystemForLanguage return an error if desired. 2015-10-02 18:40:30 +00:00
CoreMedia.h Move Objective-C data formatters to the Objective-C language plugin where they belong 2015-09-14 22:18:32 +00:00
NSArray.cpp The data formatters for NSArray, NSDictionary and (only partially) NSSet contain logic to inspect the objects without running code. 2016-02-12 07:50:15 +00:00
NSDictionary.cpp The data formatters for NSArray, NSDictionary and (only partially) NSSet contain logic to inspect the objects without running code. 2016-02-12 07:50:15 +00:00
NSDictionary.h Add hooks that enable NSSet, NSDictionary and NSString formatting to apply to other types beyond the well-known ones 2015-10-02 20:59:58 +00:00
NSError.cpp Fix some Clang-tidy warnings and formatting in recently added code. 2015-11-07 00:28:50 +00:00
NSException.cpp Fix some Clang-tidy warnings and formatting in recently added code. 2015-11-07 00:28:50 +00:00
NSIndexPath.cpp Rationalization of includes in the data formatters code 2015-10-20 04:50:09 +00:00
NSSet.cpp The data formatters for NSArray, NSDictionary and (only partially) NSSet contain logic to inspect the objects without running code. 2016-02-12 07:50:15 +00:00
NSSet.h Add hooks that enable NSSet, NSDictionary and NSString formatting to apply to other types beyond the well-known ones 2015-10-02 20:59:58 +00:00
NSString.cpp This is the work I was building up to with my patches yesterday 2015-10-07 18:36:53 +00:00
NSString.h This is the work I was building up to with my patches yesterday 2015-10-07 18:36:53 +00:00
ObjCLanguage.cpp Turns out, many people define structs named Point that do not share the same 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 2015-12-18 22:04:47 +00:00
ObjCLanguage.h Introduce a way for Languages to specify whether values of "reference types" are "nil" (not pointing to anything) or uninitialized (never made to point at anything) 2015-11-10 22:39:15 +00:00