llvm-project/lldb/source/API
Jorge Gorbe Moya 1f2a21820d [NFCI] Refactor FormatterContainerPair into TieredFormatterContainer.
`FormatterContainerPair` is (as its name indicates) a very thin wrapper
over two formatter containers, one for exact matches and another one for
regex matches. The logic to decide which subcontainer to access is
replicated everywhere `FormatterContainerPair`s are used.

So, for example, when we look for a formatter there's some adhoc code
that does a lookup in the exact match formatter container, and if it
fails it does a lookup in the regex match formatter container. The same
logic is then copied and pasted for summaries, filters, and synthetic
child providers.

This change introduces a new `TieredFormatterContainer` that has two
main characteristics:

- It generalizes `FormatterContainerPair` from 2 to any number of
  subcontainers, that are looked up in priority order.
- It centralizes all the logic to choose which subcontainer to use for
  lookups, add/delete, and indexing.

This allows us to have a single copy of the same logic, templatized for
each kind of formatter. It also simplifies the upcoming addition of a
new tier of callback-based matches. See
https://discourse.llvm.org/t/rfc-python-callback-for-data-formatters-type-matching/64204
for more details about this.

The rest of the change is mostly replacing copy-pasted code with calls
to methods of the relevant `TieredFormatterContainer`, and adding some
methods to the `TypeCategoryImpl` class so we can remove some of this
copy-pasted code from `SBTypeCategory`.

Differential Revision: https://reviews.llvm.org/D133910
2022-09-27 14:28:41 -07:00
..
CMakeLists.txt Revert "[cmake] Use `CMAKE_INSTALL_LIBDIR` too" 2022-08-18 22:46:32 -04:00
SBAddress.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBAttachInfo.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBBlock.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBBreakpoint.cpp Use llvm::is_contained (NFC) 2022-07-20 09:09:19 -07:00
SBBreakpointLocation.cpp [lldb] Add SBBreakpointLocation::SetCallback 2022-09-12 17:44:02 +00:00
SBBreakpointName.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBBreakpointOptionCommon.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBBreakpointOptionCommon.h
SBBroadcaster.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
SBCommandInterpreter.cpp Have CommandObjectParsed check for "commands that take no arguments". 2022-06-27 15:14:41 -07:00
SBCommandInterpreterRunOptions.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBCommandReturnObject.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBCommunication.cpp [lldb] [Core] Split read thread support into ThreadedCommunication 2022-09-06 13:09:42 +02:00
SBCompileUnit.cpp [lldb/API] Turn SBCompileUnit::GetIndexForLineEntry into FindLineEntryIndex (NFC) 2022-05-13 18:33:05 -07:00
SBData.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBDebugger.cpp [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
SBDeclaration.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBEnvironment.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBError.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBEvent.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBExecutionContext.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBExpressionOptions.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBFile.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBFileSpec.cpp [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute. 2022-07-28 13:28:26 -07:00
SBFileSpecList.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBFrame.cpp Add the ability to show when variables fails to be available when debug info is valid. 2022-09-12 13:59:05 -07:00
SBFunction.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBHostOS.cpp [lldb] Modernize ThreadLauncher 2022-02-23 14:25:59 +01:00
SBInstruction.cpp [LLDB] Add SBInstruction::GetControlFlowKind() 2022-08-02 15:42:45 -07:00
SBInstructionList.cpp [trace] Add a flag to the decoder to output the instruction type 2022-07-12 16:23:03 -07:00
SBLanguageRuntime.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBLaunchInfo.cpp [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute. 2022-07-28 13:28:26 -07:00
SBLineEntry.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBListener.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
SBMemoryRegionInfo.cpp Use value instead of getValue (NFC) 2022-07-15 20:03:13 -07:00
SBMemoryRegionInfoList.cpp [LLDB] Applying clang-tidy modernize-use-equals-default over LLDB 2022-03-31 13:21:49 -07:00
SBModule.cpp [lldb] Use value_or instead of getValueOr (NFC) 2022-06-19 09:12:01 -07:00
SBModuleSpec.cpp Change the meaning of a UUID with all zeros for data. 2022-08-30 10:17:58 -07:00
SBPlatform.cpp [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute. 2022-07-28 13:28:26 -07:00
SBProcess.cpp Pass plugin_name in SBProcess::SaveCore 2022-06-09 16:29:50 +02:00
SBProcessInfo.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBQueue.cpp [LLDB] Applying clang-tidy modernize-use-equals-default over LLDB 2022-03-31 13:21:49 -07:00
SBQueueItem.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBReproducer.cpp [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
SBSection.cpp [lldb] add SBSection.alignment to python bindings 2022-07-12 12:18:38 +02:00
SBSourceManager.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBStream.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
SBStringList.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBStructuredData.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBSymbol.cpp Don't create sections for SHN_ABS symbols in ELF files. 2022-08-22 14:46:27 -07:00
SBSymbolContext.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBSymbolContextList.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBTarget.cpp Don't report memory return values on MacOS_arm64 of SysV_arm64 ABI's. 2022-03-14 15:25:40 -07:00
SBThread.cpp [lldb] [gdb-remote] Support getting siginfo via API 2022-01-28 17:47:47 +01:00
SBThreadCollection.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBThreadPlan.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBTrace.cpp [trace] Add SBTraceCursor bindings 2022-08-02 16:55:33 -07:00
SBTraceCursor.cpp [lldb] Add missing newlines after LLDB_INSTRUMENT_VA 2022-08-03 10:51:16 -07:00
SBType.cpp [lldb] Automatically unwrap parameter packs in template argument accessors 2022-08-16 18:10:14 -07:00
SBTypeCategory.cpp [NFCI] Refactor FormatterContainerPair into TieredFormatterContainer. 2022-09-27 14:28:41 -07:00
SBTypeEnumMember.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBTypeFilter.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBTypeFormat.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBTypeNameSpecifier.cpp [Formatters][NFCI] Replace 'is_regex' arguments with an enum. 2022-09-13 12:50:55 -07:00
SBTypeSummary.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBTypeSynthetic.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBUnixSignals.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBValue.cpp [lldb] Use value_or instead of getValueOr (NFC) 2022-06-19 09:12:01 -07:00
SBValueList.cpp Add the ability to show when variables fails to be available when debug info is valid. 2022-09-12 13:59:05 -07:00
SBVariablesOptions.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SBWatchpoint.cpp [lldb] Decouple instrumentation from the reproducers 2022-01-20 18:06:14 -08:00
SystemInitializerFull.cpp [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
SystemInitializerFull.h
Utils.h
liblldb-private.exports [lldb/lua] Supplement Lua bindings for lldb module 2021-10-12 22:10:21 +08:00
liblldb.exports [lldb/lua] Supplement Lua bindings for lldb module 2021-10-12 22:10:21 +08:00