llvm-project/lldb/source/Commands
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
..
CMakeLists.txt [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
CommandCompletions.cpp [Commands] Remove redundant member initialization (NFC) 2022-01-23 11:07:14 -08:00
CommandObjectApropos.cpp Add a "command container" hierarchy to allow users to add container nodes. 2021-10-18 15:29:24 -07:00
CommandObjectApropos.h
CommandObjectBreakpoint.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectBreakpoint.h
CommandObjectBreakpointCommand.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectBreakpointCommand.h
CommandObjectCommands.cpp [lldb] Remove LLDB reproducers 2022-09-19 14:43:31 -07:00
CommandObjectCommands.h
CommandObjectDisassemble.cpp [lldb] Remove redundant member initialization (NFC) 2022-07-24 12:27:09 -07:00
CommandObjectDisassemble.h [trace] Add a flag to the decoder to output the instruction type 2022-07-12 16:23:03 -07:00
CommandObjectExpression.cpp Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it. 2022-10-17 17:27:54 -07:00
CommandObjectExpression.h
CommandObjectFrame.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
CommandObjectFrame.h
CommandObjectGUI.cpp Have CommandObjectParsed check for "commands that take no arguments". 2022-06-27 15:14:41 -07:00
CommandObjectGUI.h
CommandObjectHelp.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectHelp.h [lldb] Fix modernize-use-equals-default warnings (NFC) 2022-06-17 15:08:02 -07:00
CommandObjectLanguage.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
CommandObjectLanguage.h
CommandObjectLog.cpp [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute. 2022-07-28 13:28:26 -07:00
CommandObjectLog.h
CommandObjectMemory.cpp [LLDB] Fix "memory region --all" when there is no ABI plugin 2022-09-23 12:32:38 +00:00
CommandObjectMemory.h
CommandObjectMemoryTag.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectMemoryTag.h [lldb][AArch64] Add "memory tag read" command 2021-06-24 17:35:45 +01:00
CommandObjectMultiword.cpp Add a repeat command option for "thread backtrace --count N". 2022-02-14 15:48:06 -08:00
CommandObjectPlatform.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectPlatform.h
CommandObjectPlugin.cpp [lldb] Remove redundant calls to set eReturnStatusFailed 2021-06-17 14:39:35 +01:00
CommandObjectPlugin.h
CommandObjectProcess.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectProcess.h
CommandObjectQuit.cpp Have CommandObjectParsed check for "commands that take no arguments". 2022-06-27 15:14:41 -07:00
CommandObjectQuit.h
CommandObjectRegexCommand.cpp CommandObjectRegexCommand shouldn't put two commands on the history stack. 2022-06-03 11:34:53 -07:00
CommandObjectRegexCommand.h [lldb] Fix (unintentional) recursion in CommandObjectRegexCommand 2022-02-23 12:34:14 -08:00
CommandObjectRegister.cpp [lldb] Always use APFloat for FP dumping 2022-07-27 14:30:35 +02:00
CommandObjectRegister.h
CommandObjectScript.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectScript.h [lldb] Fix modernize-use-equals-default warnings (NFC) 2022-06-17 15:08:02 -07:00
CommandObjectSession.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectSession.h
CommandObjectSettings.cpp [lldb] Fix completion of 'settings set' values 2022-09-26 11:26:13 -07:00
CommandObjectSettings.h
CommandObjectSource.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectSource.h
CommandObjectStats.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectStats.h
CommandObjectTarget.cpp [lldb] Print newline between found types 2022-10-17 14:24:21 -07:00
CommandObjectTarget.h
CommandObjectThread.cpp [lldb][trace] Fix some minor bugs in the call tree 2022-10-19 00:44:48 -07:00
CommandObjectThread.h
CommandObjectThreadUtil.cpp [trace] Fix errors when handling command arguments 2022-06-28 17:54:30 -07:00
CommandObjectThreadUtil.h [trace] Fix errors when handling command arguments 2022-06-28 17:54:30 -07:00
CommandObjectTrace.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectTrace.h
CommandObjectType.cpp [lldb] Add matching based on Python callbacks for data formatters. 2022-10-19 12:53:38 -07:00
CommandObjectType.h
CommandObjectVersion.cpp Have CommandObjectParsed check for "commands that take no arguments". 2022-06-27 15:14:41 -07:00
CommandObjectVersion.h
CommandObjectWatchpoint.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectWatchpoint.h
CommandObjectWatchpointCommand.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandObjectWatchpointCommand.h
CommandOptionArgumentTable.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandOptionsProcessLaunch.cpp [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
CommandOptionsProcessLaunch.h [Commands] Remove redundant member initialization (NFC) 2022-01-23 11:07:14 -08:00
Options.td [lldb][trace] Add a basic function call dumpdump [1] - Add the command scaffolding 2022-10-18 13:57:52 -07:00
OptionsBase.td [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00