LLDB  mainline
Classes | Namespaces | Typedefs | Enumerations | 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 <map>
#include <memory>
#include <mutex>
#include <string>
#include <utility>
#include <vector>
#include <assert.h>
Include dependency graph for PluginManager.cpp:

Go to the source code of this file.

Classes

struct  PluginInfo
 
struct  ABIInstance
 
struct  ArchitectureInstance
 
struct  DisassemblerInstance
 
struct  DynamicLoaderInstance
 
struct  JITLoaderInstance
 
struct  EmulateInstructionInstance
 
struct  OperatingSystemInstance
 
struct  LanguageInstance
 
struct  LanguageRuntimeInstance
 
struct  SystemRuntimeInstance
 
struct  ObjectFileInstance
 
struct  ObjectContainerInstance
 
struct  PlatformInstance
 
struct  ProcessInstance
 
struct  ScriptInterpreterInstance
 
struct  StructuredDataPluginInstance
 
struct  SymbolFileInstance
 
struct  SymbolVendorInstance
 
struct  UnwindAssemblyInstance
 
struct  MemoryHistoryInstance
 
struct  InstrumentationRuntimeInstance
 
struct  TypeSystemInstance
 
struct  REPLInstance
 

Namespaces

 lldb_private
 Enumerations for broadcasting.
 

Typedefs

typedef bool(* PluginInitCallback) ()
 
typedef void(* PluginTermCallback) ()
 
typedef std::map< FileSpec, PluginInfoPluginTerminateMap
 
typedef std::vector< ABIInstanceABIInstances
 
typedef std::vector< ArchitectureInstanceArchitectureInstances
 
typedef std::vector< DisassemblerInstanceDisassemblerInstances
 
typedef std::vector< DynamicLoaderInstanceDynamicLoaderInstances
 
typedef std::vector< JITLoaderInstanceJITLoaderInstances
 
typedef std::vector< EmulateInstructionInstanceEmulateInstructionInstances
 
typedef std::vector< OperatingSystemInstanceOperatingSystemInstances
 
typedef std::vector< LanguageInstanceLanguageInstances
 
typedef std::vector< LanguageRuntimeInstanceLanguageRuntimeInstances
 
typedef std::vector< SystemRuntimeInstanceSystemRuntimeInstances
 
typedef std::vector< ObjectFileInstanceObjectFileInstances
 
typedef std::vector< ObjectContainerInstanceObjectContainerInstances
 
typedef std::vector< PlatformInstancePlatformInstances
 
typedef std::vector< ProcessInstanceProcessInstances
 
typedef std::vector< ScriptInterpreterInstanceScriptInterpreterInstances
 
typedef std::vector< StructuredDataPluginInstanceStructuredDataPluginInstances
 
typedef std::vector< SymbolFileInstanceSymbolFileInstances
 
typedef std::vector< SymbolVendorInstanceSymbolVendorInstances
 
typedef std::vector< UnwindAssemblyInstanceUnwindAssemblyInstances
 
typedef std::vector< MemoryHistoryInstanceMemoryHistoryInstances
 
typedef std::vector< InstrumentationRuntimeInstanceInstrumentationRuntimeInstances
 
typedef std::vector< TypeSystemInstanceTypeSystemInstances
 
typedef std::vector< REPLInstanceREPLInstances
 

Enumerations

enum  PluginAction { ePluginRegisterInstance, ePluginUnregisterInstance, ePluginGetInstanceAtIndex }
 

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 std::recursive_mutex & GetABIInstancesMutex ()
 
static ABIInstancesGetABIInstances ()
 
static std::mutex & GetArchitectureMutex ()
 
static ArchitectureInstancesGetArchitectureInstances ()
 
static std::recursive_mutex & GetDisassemblerMutex ()
 
static DisassemblerInstancesGetDisassemblerInstances ()
 
static std::recursive_mutex & GetDynamicLoaderMutex ()
 
static DynamicLoaderInstancesGetDynamicLoaderInstances ()
 
static std::recursive_mutex & GetJITLoaderMutex ()
 
static JITLoaderInstancesGetJITLoaderInstances ()
 
static std::recursive_mutex & GetEmulateInstructionMutex ()
 
static EmulateInstructionInstancesGetEmulateInstructionInstances ()
 
static std::recursive_mutex & GetOperatingSystemMutex ()
 
static OperatingSystemInstancesGetOperatingSystemInstances ()
 
static std::recursive_mutex & GetLanguageMutex ()
 
static LanguageInstancesGetLanguageInstances ()
 
static std::recursive_mutex & GetLanguageRuntimeMutex ()
 
static LanguageRuntimeInstancesGetLanguageRuntimeInstances ()
 
static std::recursive_mutex & GetSystemRuntimeMutex ()
 
static SystemRuntimeInstancesGetSystemRuntimeInstances ()
 
static std::recursive_mutex & GetObjectFileMutex ()
 
static ObjectFileInstancesGetObjectFileInstances ()
 
static std::recursive_mutex & GetObjectContainerMutex ()
 
static ObjectContainerInstancesGetObjectContainerInstances ()
 
static std::recursive_mutex & GetPlatformInstancesMutex ()
 
static PlatformInstancesGetPlatformInstances ()
 
static std::recursive_mutex & GetProcessMutex ()
 
static ProcessInstancesGetProcessInstances ()
 
static std::recursive_mutex & GetScriptInterpreterMutex ()
 
static ScriptInterpreterInstancesGetScriptInterpreterInstances ()
 
static std::recursive_mutex & GetStructuredDataPluginMutex ()
 
static StructuredDataPluginInstancesGetStructuredDataPluginInstances ()
 
static std::recursive_mutex & GetSymbolFileMutex ()
 
static SymbolFileInstancesGetSymbolFileInstances ()
 
static std::recursive_mutex & GetSymbolVendorMutex ()
 
static SymbolVendorInstancesGetSymbolVendorInstances ()
 
static std::recursive_mutex & GetUnwindAssemblyMutex ()
 
static UnwindAssemblyInstancesGetUnwindAssemblyInstances ()
 
static std::recursive_mutex & GetMemoryHistoryMutex ()
 
static MemoryHistoryInstancesGetMemoryHistoryInstances ()
 
static std::recursive_mutex & GetInstrumentationRuntimeMutex ()
 
static InstrumentationRuntimeInstancesGetInstrumentationRuntimeInstances ()
 
static std::recursive_mutex & GetTypeSystemMutex ()
 
static TypeSystemInstancesGetTypeSystemInstances ()
 
static std::recursive_mutex & GetREPLMutex ()
 
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

◆ ABIInstances

typedef std::vector<ABIInstance> ABIInstances

Definition at line 210 of file PluginManager.cpp.

◆ ArchitectureInstances

Definition at line 286 of file PluginManager.cpp.

◆ DisassemblerInstances

Definition at line 339 of file PluginManager.cpp.

◆ DynamicLoaderInstances

Definition at line 423 of file PluginManager.cpp.

◆ EmulateInstructionInstances

Definition at line 589 of file PluginManager.cpp.

◆ InstrumentationRuntimeInstances

Definition at line 1984 of file PluginManager.cpp.

◆ JITLoaderInstances

typedef std::vector<JITLoaderInstance> JITLoaderInstances

Definition at line 508 of file PluginManager.cpp.

◆ LanguageInstances

typedef std::vector<LanguageInstance> LanguageInstances

Definition at line 754 of file PluginManager.cpp.

◆ LanguageRuntimeInstances

Definition at line 833 of file PluginManager.cpp.

◆ MemoryHistoryInstances

Definition at line 1901 of file PluginManager.cpp.

◆ ObjectContainerInstances

Definition at line 1149 of file PluginManager.cpp.

◆ ObjectFileInstances

Definition at line 1010 of file PluginManager.cpp.

◆ OperatingSystemInstances

Definition at line 672 of file PluginManager.cpp.

◆ PlatformInstances

typedef std::vector<PlatformInstance> PlatformInstances

Definition at line 1244 of file PluginManager.cpp.

◆ PluginInitCallback

typedef bool(* PluginInitCallback) ()

Definition at line 51 of file PluginManager.cpp.

◆ PluginTermCallback

typedef void(* PluginTermCallback) ()

Definition at line 52 of file PluginManager.cpp.

◆ PluginTerminateMap

Definition at line 62 of file PluginManager.cpp.

◆ ProcessInstances

typedef std::vector<ProcessInstance> ProcessInstances

Definition at line 1363 of file PluginManager.cpp.

◆ REPLInstances

typedef std::vector<REPLInstance> REPLInstances

Definition at line 2192 of file PluginManager.cpp.

◆ ScriptInterpreterInstances

Definition at line 1462 of file PluginManager.cpp.

◆ StructuredDataPluginInstances

Definition at line 1557 of file PluginManager.cpp.

◆ SymbolFileInstances

Definition at line 1660 of file PluginManager.cpp.

◆ SymbolVendorInstances

Definition at line 1741 of file PluginManager.cpp.

◆ SystemRuntimeInstances

Definition at line 924 of file PluginManager.cpp.

◆ TypeSystemInstances

Definition at line 2083 of file PluginManager.cpp.

◆ UnwindAssemblyInstances

Definition at line 1821 of file PluginManager.cpp.

Enumeration Type Documentation

◆ PluginAction

Enumerator
ePluginRegisterInstance 
ePluginUnregisterInstance 
ePluginGetInstanceAtIndex 

Definition at line 45 of file PluginManager.cpp.

Function Documentation

◆ CastToFPtr()

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

Definition at line 88 of file PluginManager.cpp.

◆ GetABIInstances()

static ABIInstances& GetABIInstances ( )
static

◆ GetABIInstancesMutex()

static std::recursive_mutex& GetABIInstancesMutex ( )
static

◆ GetArchitectureInstances()

static ArchitectureInstances& GetArchitectureInstances ( )
static

◆ GetArchitectureMutex()

static std::mutex& GetArchitectureMutex ( )
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

◆ GetDisassemblerMutex()

static std::recursive_mutex& GetDisassemblerMutex ( )
static

◆ GetDynamicLoaderInstances()

static DynamicLoaderInstances& GetDynamicLoaderInstances ( )
static

◆ GetDynamicLoaderMutex()

static std::recursive_mutex& GetDynamicLoaderMutex ( )
static

◆ GetEmulateInstructionInstances()

static EmulateInstructionInstances& GetEmulateInstructionInstances ( )
static

◆ GetEmulateInstructionMutex()

static std::recursive_mutex& GetEmulateInstructionMutex ( )
static

◆ GetInstrumentationRuntimeInstances()

static InstrumentationRuntimeInstances& GetInstrumentationRuntimeInstances ( )
static

◆ GetInstrumentationRuntimeMutex()

static std::recursive_mutex& GetInstrumentationRuntimeMutex ( )
static

◆ GetJITLoaderInstances()

static JITLoaderInstances& GetJITLoaderInstances ( )
static

◆ GetJITLoaderMutex()

static std::recursive_mutex& GetJITLoaderMutex ( )
static

◆ GetLanguageInstances()

static LanguageInstances& GetLanguageInstances ( )
static

◆ GetLanguageMutex()

static std::recursive_mutex& GetLanguageMutex ( )
static

◆ GetLanguageRuntimeInstances()

static LanguageRuntimeInstances& GetLanguageRuntimeInstances ( )
static

◆ GetLanguageRuntimeMutex()

static std::recursive_mutex& GetLanguageRuntimeMutex ( )
static

◆ GetMemoryHistoryInstances()

static MemoryHistoryInstances& GetMemoryHistoryInstances ( )
static

◆ GetMemoryHistoryMutex()

static std::recursive_mutex& GetMemoryHistoryMutex ( )
static

◆ GetObjectContainerInstances()

static ObjectContainerInstances& GetObjectContainerInstances ( )
static

◆ GetObjectContainerMutex()

static std::recursive_mutex& GetObjectContainerMutex ( )
static

◆ GetObjectFileInstances()

static ObjectFileInstances& GetObjectFileInstances ( )
static

◆ GetObjectFileMutex()

static std::recursive_mutex& GetObjectFileMutex ( )
static

◆ GetOperatingSystemInstances()

static OperatingSystemInstances& GetOperatingSystemInstances ( )
static

◆ GetOperatingSystemMutex()

static std::recursive_mutex& GetOperatingSystemMutex ( )
static

◆ GetPlatformInstances()

static PlatformInstances& GetPlatformInstances ( )
static

◆ GetPlatformInstancesMutex()

static std::recursive_mutex& GetPlatformInstancesMutex ( )
static

◆ GetPluginMap()

static PluginTerminateMap& GetPluginMap ( )
static

◆ GetPluginMapMutex()

static std::recursive_mutex& GetPluginMapMutex ( )
static

◆ GetProcessInstances()

static ProcessInstances& GetProcessInstances ( )
static

◆ GetProcessMutex()

static std::recursive_mutex& GetProcessMutex ( )
static

◆ GetREPLInstances()

static REPLInstances& GetREPLInstances ( )
static

◆ GetREPLMutex()

static std::recursive_mutex& GetREPLMutex ( )
static

◆ GetScriptInterpreterInstances()

static ScriptInterpreterInstances& GetScriptInterpreterInstances ( )
static

◆ GetScriptInterpreterMutex()

static std::recursive_mutex& GetScriptInterpreterMutex ( )
static

◆ GetStructuredDataPluginInstances()

static StructuredDataPluginInstances& GetStructuredDataPluginInstances ( )
static

◆ GetStructuredDataPluginMutex()

static std::recursive_mutex& GetStructuredDataPluginMutex ( )
static

◆ GetSymbolFileInstances()

static SymbolFileInstances& GetSymbolFileInstances ( )
static

◆ GetSymbolFileMutex()

static std::recursive_mutex& GetSymbolFileMutex ( )
static

◆ GetSymbolVendorInstances()

static SymbolVendorInstances& GetSymbolVendorInstances ( )
static

◆ GetSymbolVendorMutex()

static std::recursive_mutex& GetSymbolVendorMutex ( )
static

◆ GetSystemRuntimeInstances()

static SystemRuntimeInstances& GetSystemRuntimeInstances ( )
static

◆ GetSystemRuntimeMutex()

static std::recursive_mutex& GetSystemRuntimeMutex ( )
static

◆ GetTypeSystemInstances()

static TypeSystemInstances& GetTypeSystemInstances ( )
static

◆ GetTypeSystemMutex()

static std::recursive_mutex& GetTypeSystemMutex ( )
static

◆ GetUnwindAssemblyInstances()

static UnwindAssemblyInstances& GetUnwindAssemblyInstances ( )
static

◆ GetUnwindAssemblyMutex()

static std::recursive_mutex& GetUnwindAssemblyMutex ( )
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 74 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 80 of file PluginManager.cpp.

References GetPluginMap(), and GetPluginMapMutex().

Referenced by LoadPluginCallback().