llvm-project/lldb/bindings/interface
Raphael Isemann 85bcc1eb2f [lldb] Make SBType::IsTypeComplete more consistent by forcing the loading of definitions
Currently calling SBType::IsTypeComplete returns true for record types if and
only if the underlying record in our internal Clang AST has a definition.

The function however doesn't actually force the loading of any external
definition from debug info, so it currently can return false even if the type is
actually defined in a program's debug info but LLDB hasn't lazily created the
definition yet.

This patch changes the behaviour to always load the definition first so that
IsTypeComplete now consistently returns true if there is a definition in the
module/target.

The motivation for this patch is twofold:

* The API is now arguably more useful for the user which don't know or care
about the internal lazy loading mechanism of LLDB.

* With D101950 there is no longer a good way to ask a Decl for a definition
without automatically pulling in a definition from the ExternalASTSource. The
current behaviour doesn't seem useful enough to justify the necessary
workarounds to preserve it for a time after D101950.

Note that there was a test that used this API to test lazy loading of debug info
but that has been replaced with TestLazyLoading by now (which just dumps the
internal Clang AST state instead).

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D112615
2021-10-30 13:28:27 +02:00
..
SBAddress.i [lldb][docs] Resolve the remaining sphinx formatter warnings in the SB API docs 2021-01-18 10:47:19 +01:00
SBAttachInfo.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBBlock.i [lldb] Clarify docstring for SBBlock::IsInlined, NFC 2020-09-17 16:54:58 -07:00
SBBreakpoint.i [lldb] Use internal_dict name over dict in python examples 2021-02-10 15:11:00 -08:00
SBBreakpointLocation.i [lldb] Use internal_dict name over dict in python examples 2021-02-10 15:11:00 -08:00
SBBreakpointName.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBBroadcaster.i [lldb][docs] Resolve the remaining sphinx formatter warnings in the SB API docs 2021-01-18 10:47:19 +01:00
SBCommandInterpreter.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBCommandInterpreterRunOptions.i [lldb/API] Add CommandInterpreter::{Get,Set}PrintErrors to SBAPI (NFC) 2021-03-05 19:33:33 +01:00
SBCommandReturnObject.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBCommunication.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBCompileUnit.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBData.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBDebugger.i [lldb][docs] Resolve the remaining sphinx formatter warnings in the SB API docs 2021-01-18 10:47:19 +01:00
SBDeclaration.i
SBEnvironment.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBError.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBEvent.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBExecutionContext.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBExpressionOptions.i [lldb] NFC: Fix trivial typo in comments, documents, and messages 2020-04-07 01:06:16 +09:00
SBFile.i [lldb][docs] Use inline literals for code/paths instead of rendering it with the default role 2021-01-18 11:10:19 +01:00
SBFileSpec.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBFileSpecList.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBFrame.i [lldb][docs] Use inline literals for code/paths instead of rendering it with the default role 2021-01-18 11:10:19 +01:00
SBFunction.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBHostOS.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBInstruction.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBInstructionList.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBLanguageRuntime.i [lldb][docs] Add a doc page for enums and constants 2021-01-19 18:54:05 +01:00
SBLaunchInfo.i [lldb/Commands] Add command options for ScriptedProcess to ProcessLaunch 2021-03-23 18:24:47 +01:00
SBLineEntry.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBListener.i [lldb] Fix two documentation typos 2021-01-19 15:25:15 +01:00
SBMemoryRegionInfo.i [lldb/Plugins] Add memory region support in ScriptedProcess 2021-10-08 14:54:07 +02:00
SBMemoryRegionInfoList.i [lldb/Plugins] Add memory region support in ScriptedProcess 2021-10-08 14:54:07 +02:00
SBModule.i [lldb][docs] Resolve the remaining sphinx formatter warnings in the SB API docs 2021-01-18 10:47:19 +01:00
SBModuleSpec.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBPlatform.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBProcess.i [lldb] Add AllocateMemory/DeallocateMemory to the SBProcess API 2021-07-16 00:45:22 +02:00
SBProcessInfo.i Revert "[LLDB/API] Expose args and env from SBProcessInfo." 2021-06-05 15:50:49 +07:00
SBQueue.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBQueueItem.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBReproducer.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBSection.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBSourceManager.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBStream.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBStringList.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBStructuredData.i [trace][intel-pt] Create basic SB API 2021-06-17 15:14:47 -07:00
SBSymbol.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBSymbolContext.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBSymbolContextList.i [NFC] fix a typo 2021-10-15 14:51:49 +08:00
SBTarget.i [trace][intel-pt] Create basic SB API 2021-06-17 15:14:47 -07:00
SBThread.i [lldb] [gdb-remote server] Introduce new stop reasons for fork and vfork 2021-04-24 11:08:33 +02:00
SBThreadCollection.i
SBThreadPlan.i [lldb] [gdb-remote server] Introduce new stop reasons for fork and vfork 2021-04-24 11:08:33 +02:00
SBTrace.i [trace][intel-pt] Create basic SB API 2021-06-17 15:14:47 -07:00
SBType.i [lldb] Make SBType::IsTypeComplete more consistent by forcing the loading of definitions 2021-10-30 13:28:27 +02:00
SBTypeCategory.i
SBTypeEnumMember.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBTypeFilter.i
SBTypeFormat.i
SBTypeNameSpecifier.i
SBTypeSummary.i
SBTypeSynthetic.i
SBUnixSignals.i
SBValue.i [lldb][docs] Use inline literals for code/paths instead of rendering it with the default role 2021-01-18 11:10:19 +01:00
SBValueList.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00
SBVariablesOptions.i [lldb][docs] Cleanup the Python doc strings for SB API classes 2021-01-17 16:51:07 +01:00
SBWatchpoint.i [lldb][docs] Translate ASCII art to restructured text formatting 2021-01-15 14:43:27 +01:00