llvm-project/lldb/source/Plugins/Language/ObjC
Jorge Gorbe Moya d76566417e [lldb] Add matching based on Python callbacks for data formatters.
This patch adds a new matching method for data formatters, in addition
to the existing exact typename and regex-based matching. The new method
allows users to specify the name of a Python callback function that
takes a `SBType` object and decides whether the type is a match or not.

Here is an overview of the changes performed:

- Add a new `eFormatterMatchCallback` matching type, and logic to handle
  it in `TypeMatcher` and `SBTypeNameSpecifier`.

- Extend `FormattersMatchCandidate` instances with a pointer to the
  current `ScriptInterpreter` and the `TypeImpl` corresponding to the
  candidate type, so we can run registered callbacks and pass the type
  to them. All matcher search functions now receive a
  `FormattersMatchCandidate` instead of a type name.

- Add some glue code to ScriptInterpreterPython and the SWIG bindings to
  allow calling a formatter matching callback. Most of this code is
  modeled after the equivalent code for watchpoint callback functions.

- Add an API test for the new callback-based matching feature.

For more context, please check the RFC thread where this feature was
originally discussed:
https://discourse.llvm.org/t/rfc-python-callback-for-data-formatters-type-matching/64204/11

Differential Revision: https://reviews.llvm.org/D135648
2022-10-19 12:53:38 -07:00
..
CF.cpp [lldb] Refactor DataBuffer so we can map files as read-only 2022-04-05 13:46:37 -07:00
CF.h
CFBasicHash.cpp
CFBasicHash.h [LLDB][NFC][Reliability] Fix uninitialized variables from Coverity scan 2022-07-20 14:50:48 -07:00
CMakeLists.txt
Cocoa.cpp [lldb] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:31:49 -07:00
Cocoa.h
CoreMedia.cpp [LLDB][Reliability] Remove dead code. 2022-08-02 10:09:45 -07:00
CoreMedia.h
NSArray.cpp [LLDB][NFC] Fix incorrect return status Some functions always return 'false' for both success and fail return paths. 2022-08-02 15:56:23 -07:00
NSDictionary.cpp [LLDB][NFC] Fix incorrect return status Some functions always return 'false' for both success and fail return paths. 2022-08-02 15:56:23 -07:00
NSDictionary.h
NSError.cpp [LLDB][NFC][Reliability] Fix uninitialized variables from Coverity scan 2022-07-20 14:50:48 -07:00
NSException.cpp [LLDB] Replace use of double underscore in identifiers 2022-02-16 11:54:45 -08:00
NSIndexPath.cpp [LLDB] Fix NSIndexPathSyntheticFrontEnd::Impl::Clear() to only clear the active union member 2022-03-30 18:00:37 -07:00
NSSet.cpp [LLDB][NFC] Fix incorrect return status Some functions always return 'false' for both success and fail return paths. 2022-08-02 15:56:23 -07:00
NSSet.h
NSString.cpp [lldb] Remove ProcessStructReader from NSStringSummaryProvider (NFC) 2022-01-09 12:09:02 -08:00
NSString.h
ObjCConstants.h [lldb] Move Objective-C constants into ObjCConstants.h 2021-08-07 16:04:52 -07:00
ObjCLanguage.cpp [lldb] Add matching based on Python callbacks for data formatters. 2022-10-19 12:53:38 -07:00
ObjCLanguage.h [lldb] Add matching based on Python callbacks for data formatters. 2022-10-19 12:53:38 -07:00