LLDB  mainline
Classes | Typedefs | Functions
PluginManager.cpp File Reference
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StringList.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/raw_ostream.h"
#include <assert.h>
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for PluginManager.cpp:

Go to the source code of this file.

Classes

struct  PluginInfo
 
struct  PluginInstance< Callback >
 
class  PluginInstances< Instance >
 
struct  LanguageRuntimeInstance
 
struct  ObjectFileInstance
 
struct  ObjectContainerInstance
 
struct  ScriptInterpreterInstance
 
struct  StructuredDataPluginInstance
 
struct  InstrumentationRuntimeInstance
 
struct  TypeSystemInstance
 
struct  REPLInstance
 

Typedefs

typedef bool(* PluginInitCallback) ()
 
typedef void(* PluginTermCallback) ()
 
typedef std::map< FileSpec, PluginInfoPluginTerminateMap
 
typedef PluginInstance< ABICreateInstance > ABIInstance
 
typedef PluginInstances< ABIInstanceABIInstances
 
typedef PluginInstance< ArchitectureCreateInstance > ArchitectureInstance
 
typedef std::vector< ArchitectureInstanceArchitectureInstances
 
typedef PluginInstance< DisassemblerCreateInstance > DisassemblerInstance
 
typedef PluginInstances< DisassemblerInstanceDisassemblerInstances
 
typedef PluginInstance< DynamicLoaderCreateInstance > DynamicLoaderInstance
 
typedef PluginInstances< DynamicLoaderInstanceDynamicLoaderInstances
 
typedef PluginInstance< JITLoaderCreateInstance > JITLoaderInstance
 
typedef PluginInstances< JITLoaderInstanceJITLoaderInstances
 
typedef PluginInstance< EmulateInstructionCreateInstance > EmulateInstructionInstance
 
typedef PluginInstances< EmulateInstructionInstanceEmulateInstructionInstances
 
typedef PluginInstance< OperatingSystemCreateInstance > OperatingSystemInstance
 
typedef PluginInstances< OperatingSystemInstanceOperatingSystemInstances
 
typedef PluginInstance< LanguageCreateInstance > LanguageInstance
 
typedef PluginInstances< LanguageInstanceLanguageInstances
 
typedef PluginInstances< LanguageRuntimeInstanceLanguageRuntimeInstances
 
typedef PluginInstance< SystemRuntimeCreateInstance > SystemRuntimeInstance
 
typedef PluginInstances< SystemRuntimeInstanceSystemRuntimeInstances
 
typedef PluginInstances< ObjectFileInstanceObjectFileInstances
 
typedef PluginInstances< ObjectContainerInstanceObjectContainerInstances
 
typedef PluginInstance< PlatformCreateInstance > PlatformInstance
 
typedef PluginInstances< PlatformInstancePlatformInstances
 
typedef PluginInstance< ProcessCreateInstance > ProcessInstance
 
typedef PluginInstances< ProcessInstanceProcessInstances
 
typedef PluginInstances< ScriptInterpreterInstanceScriptInterpreterInstances
 
typedef PluginInstances< StructuredDataPluginInstanceStructuredDataPluginInstances
 
typedef PluginInstance< SymbolFileCreateInstance > SymbolFileInstance
 
typedef PluginInstances< SymbolFileInstanceSymbolFileInstances
 
typedef PluginInstance< SymbolVendorCreateInstance > SymbolVendorInstance
 
typedef PluginInstances< SymbolVendorInstanceSymbolVendorInstances
 
typedef PluginInstance< UnwindAssemblyCreateInstance > UnwindAssemblyInstance
 
typedef PluginInstances< UnwindAssemblyInstanceUnwindAssemblyInstances
 
typedef PluginInstance< MemoryHistoryCreateInstance > MemoryHistoryInstance
 
typedef PluginInstances< MemoryHistoryInstanceMemoryHistoryInstances
 
typedef PluginInstances< InstrumentationRuntimeInstanceInstrumentationRuntimeInstances
 
typedef PluginInstances< TypeSystemInstanceTypeSystemInstances
 
typedef PluginInstances< REPLInstanceREPLInstances
 

Functions

static std::recursive_mutex & GetPluginMapMutex ()
 
static PluginTerminateMapGetPluginMap ()
 
static bool PluginIsLoaded (const FileSpec &plugin_file_spec)
 
static void SetPluginInfo (const FileSpec &plugin_file_spec, const PluginInfo &plugin_info)
 
template<typename FPtrTy >
static FPtrTy CastToFPtr (void *VPtr)
 
static FileSystem::EnumerateDirectoryResult LoadPluginCallback (void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path)
 
static ABIInstancesGetABIInstances ()
 
static ArchitectureInstancesGetArchitectureInstances ()
 
static DisassemblerInstancesGetDisassemblerInstances ()
 
static DynamicLoaderInstancesGetDynamicLoaderInstances ()
 
static JITLoaderInstancesGetJITLoaderInstances ()
 
static EmulateInstructionInstancesGetEmulateInstructionInstances ()
 
static OperatingSystemInstancesGetOperatingSystemInstances ()
 
static LanguageInstancesGetLanguageInstances ()
 
static LanguageRuntimeInstancesGetLanguageRuntimeInstances ()
 
static SystemRuntimeInstancesGetSystemRuntimeInstances ()
 
static ObjectFileInstancesGetObjectFileInstances ()
 
static ObjectContainerInstancesGetObjectContainerInstances ()
 
static PlatformInstancesGetPlatformInstances ()
 
static ProcessInstancesGetProcessInstances ()
 
static ScriptInterpreterInstancesGetScriptInterpreterInstances ()
 
static StructuredDataPluginInstancesGetStructuredDataPluginInstances ()
 
static SymbolFileInstancesGetSymbolFileInstances ()
 
static SymbolVendorInstancesGetSymbolVendorInstances ()
 
static UnwindAssemblyInstancesGetUnwindAssemblyInstances ()
 
static MemoryHistoryInstancesGetMemoryHistoryInstances ()
 
static InstrumentationRuntimeInstancesGetInstrumentationRuntimeInstances ()
 
static TypeSystemInstancesGetTypeSystemInstances ()
 
static REPLInstancesGetREPLInstances ()
 
static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPlugins (Debugger &debugger, ConstString plugin_type_name, ConstString plugin_type_desc, bool can_create)
 
static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle (Debugger &debugger, ConstString plugin_type_name, ConstString plugin_type_desc, bool can_create)
 
static const char * kOperatingSystemPluginName ("os")
 

Typedef Documentation

◆ ABIInstance

typedef PluginInstance<ABICreateInstance> ABIInstance

Definition at line 278 of file PluginManager.cpp.

◆ ABIInstances

Definition at line 279 of file PluginManager.cpp.

◆ ArchitectureInstance

typedef PluginInstance<ArchitectureCreateInstance> ArchitectureInstance

Definition at line 301 of file PluginManager.cpp.

◆ ArchitectureInstances

Definition at line 302 of file PluginManager.cpp.

◆ DisassemblerInstance

typedef PluginInstance<DisassemblerCreateInstance> DisassemblerInstance

Definition at line 340 of file PluginManager.cpp.

◆ DisassemblerInstances

Definition at line 341 of file PluginManager.cpp.

◆ DynamicLoaderInstance

typedef PluginInstance<DynamicLoaderCreateInstance> DynamicLoaderInstance

Definition at line 371 of file PluginManager.cpp.

◆ DynamicLoaderInstances

Definition at line 372 of file PluginManager.cpp.

◆ EmulateInstructionInstance

typedef PluginInstance<EmulateInstructionCreateInstance> EmulateInstructionInstance

Definition at line 432 of file PluginManager.cpp.

◆ EmulateInstructionInstances

Definition at line 433 of file PluginManager.cpp.

◆ InstrumentationRuntimeInstances

Definition at line 1077 of file PluginManager.cpp.

◆ JITLoaderInstance

typedef PluginInstance<JITLoaderCreateInstance> JITLoaderInstance

Definition at line 404 of file PluginManager.cpp.

◆ JITLoaderInstances

Definition at line 405 of file PluginManager.cpp.

◆ LanguageInstance

typedef PluginInstance<LanguageCreateInstance> LanguageInstance

Definition at line 498 of file PluginManager.cpp.

◆ LanguageInstances

Definition at line 499 of file PluginManager.cpp.

◆ LanguageRuntimeInstances

Definition at line 540 of file PluginManager.cpp.

◆ MemoryHistoryInstance

typedef PluginInstance<MemoryHistoryCreateInstance> MemoryHistoryInstance

Definition at line 1037 of file PluginManager.cpp.

◆ MemoryHistoryInstances

Definition at line 1038 of file PluginManager.cpp.

◆ ObjectContainerInstances

Definition at line 711 of file PluginManager.cpp.

◆ ObjectFileInstances

Definition at line 628 of file PluginManager.cpp.

◆ OperatingSystemInstance

typedef PluginInstance<OperatingSystemCreateInstance> OperatingSystemInstance

Definition at line 465 of file PluginManager.cpp.

◆ OperatingSystemInstances

Definition at line 466 of file PluginManager.cpp.

◆ PlatformInstance

typedef PluginInstance<PlatformCreateInstance> PlatformInstance

Definition at line 747 of file PluginManager.cpp.

◆ PlatformInstances

Definition at line 748 of file PluginManager.cpp.

◆ PluginInitCallback

typedef bool(* PluginInitCallback) ()

Definition at line 37 of file PluginManager.cpp.

◆ PluginTermCallback

typedef void(* PluginTermCallback) ()

Definition at line 38 of file PluginManager.cpp.

◆ PluginTerminateMap

Definition at line 48 of file PluginManager.cpp.

◆ ProcessInstance

typedef PluginInstance<ProcessCreateInstance> ProcessInstance

Definition at line 795 of file PluginManager.cpp.

◆ ProcessInstances

Definition at line 796 of file PluginManager.cpp.

◆ REPLInstances

Definition at line 1181 of file PluginManager.cpp.

◆ ScriptInterpreterInstances

Definition at line 855 of file PluginManager.cpp.

◆ StructuredDataPluginInstances

Definition at line 915 of file PluginManager.cpp.

◆ SymbolFileInstance

typedef PluginInstance<SymbolFileCreateInstance> SymbolFileInstance

Definition at line 957 of file PluginManager.cpp.

◆ SymbolFileInstances

Definition at line 958 of file PluginManager.cpp.

◆ SymbolVendorInstance

typedef PluginInstance<SymbolVendorCreateInstance> SymbolVendorInstance

Definition at line 984 of file PluginManager.cpp.

◆ SymbolVendorInstances

Definition at line 985 of file PluginManager.cpp.

◆ SystemRuntimeInstance

typedef PluginInstance<SystemRuntimeCreateInstance> SystemRuntimeInstance

Definition at line 585 of file PluginManager.cpp.

◆ SystemRuntimeInstances

Definition at line 586 of file PluginManager.cpp.

◆ TypeSystemInstances

Definition at line 1127 of file PluginManager.cpp.

◆ UnwindAssemblyInstance

typedef PluginInstance<UnwindAssemblyCreateInstance> UnwindAssemblyInstance

Definition at line 1010 of file PluginManager.cpp.

◆ UnwindAssemblyInstances

Definition at line 1011 of file PluginManager.cpp.

Function Documentation

◆ CastToFPtr()

template<typename FPtrTy >
static FPtrTy CastToFPtr ( void *  VPtr)
static

Definition at line 74 of file PluginManager.cpp.

◆ GetABIInstances()

static ABIInstances& GetABIInstances ( )
static

◆ GetArchitectureInstances()

static ArchitectureInstances& GetArchitectureInstances ( )
static

◆ GetDebuggerPropertyForPlugins()

static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPlugins ( Debugger debugger,
ConstString  plugin_type_name,
ConstString  plugin_type_desc,
bool  can_create 
)
static

◆ GetDebuggerPropertyForPluginsOldStyle()

static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle ( Debugger debugger,
ConstString  plugin_type_name,
ConstString  plugin_type_desc,
bool  can_create 
)
static

◆ GetDisassemblerInstances()

static DisassemblerInstances& GetDisassemblerInstances ( )
static

◆ GetDynamicLoaderInstances()

static DynamicLoaderInstances& GetDynamicLoaderInstances ( )
static

◆ GetEmulateInstructionInstances()

static EmulateInstructionInstances& GetEmulateInstructionInstances ( )
static

◆ GetInstrumentationRuntimeInstances()

static InstrumentationRuntimeInstances& GetInstrumentationRuntimeInstances ( )
static

◆ GetJITLoaderInstances()

static JITLoaderInstances& GetJITLoaderInstances ( )
static

◆ GetLanguageInstances()

static LanguageInstances& GetLanguageInstances ( )
static

◆ GetLanguageRuntimeInstances()

static LanguageRuntimeInstances& GetLanguageRuntimeInstances ( )
static

◆ GetMemoryHistoryInstances()

static MemoryHistoryInstances& GetMemoryHistoryInstances ( )
static

◆ GetObjectContainerInstances()

static ObjectContainerInstances& GetObjectContainerInstances ( )
static

◆ GetObjectFileInstances()

static ObjectFileInstances& GetObjectFileInstances ( )
static

◆ GetOperatingSystemInstances()

static OperatingSystemInstances& GetOperatingSystemInstances ( )
static

◆ GetPlatformInstances()

static PlatformInstances& GetPlatformInstances ( )
static

◆ GetPluginMap()

static PluginTerminateMap& GetPluginMap ( )
static

◆ GetPluginMapMutex()

static std::recursive_mutex& GetPluginMapMutex ( )
static

◆ GetProcessInstances()

static ProcessInstances& GetProcessInstances ( )
static

◆ GetREPLInstances()

static REPLInstances& GetREPLInstances ( )
static

◆ GetScriptInterpreterInstances()

static ScriptInterpreterInstances& GetScriptInterpreterInstances ( )
static

◆ GetStructuredDataPluginInstances()

static StructuredDataPluginInstances& GetStructuredDataPluginInstances ( )
static

◆ GetSymbolFileInstances()

static SymbolFileInstances& GetSymbolFileInstances ( )
static

◆ GetSymbolVendorInstances()

static SymbolVendorInstances& GetSymbolVendorInstances ( )
static

◆ GetSystemRuntimeInstances()

static SystemRuntimeInstances& GetSystemRuntimeInstances ( )
static

◆ GetTypeSystemInstances()

static TypeSystemInstances& GetTypeSystemInstances ( )
static

◆ GetUnwindAssemblyInstances()

static UnwindAssemblyInstances& GetUnwindAssemblyInstances ( )
static

◆ kOperatingSystemPluginName()

static const char* kOperatingSystemPluginName ( "os"  )
static

◆ LoadPluginCallback()

static FileSystem::EnumerateDirectoryResult LoadPluginCallback ( void *  baton,
llvm::sys::fs::file_type  ft,
llvm::StringRef  path 
)
static

◆ PluginIsLoaded()

static bool PluginIsLoaded ( const FileSpec plugin_file_spec)
static

Definition at line 60 of file PluginManager.cpp.

References GetPluginMap(), and GetPluginMapMutex().

Referenced by LoadPluginCallback().

◆ SetPluginInfo()

static void SetPluginInfo ( const FileSpec plugin_file_spec,
const PluginInfo plugin_info 
)
static

Definition at line 66 of file PluginManager.cpp.

References GetPluginMap(), and GetPluginMapMutex().

Referenced by LoadPluginCallback().