LLDB mainline
|
#include <SymbolFileWasm.h>
Public Member Functions | |
SymbolFileWasm (lldb::ObjectFileSP objfile_sp, SectionList *dwo_section_list) | |
~SymbolFileWasm () override | |
lldb::offset_t | GetVendorDWARFOpcodeSize (const DataExtractor &data, const lldb::offset_t data_offset, const uint8_t op) const override |
bool | ParseVendorDWARFOpcode (uint8_t op, const DataExtractor &opcodes, lldb::offset_t &offset, RegisterContext *reg_ctx, lldb::RegisterKind reg_kind, std::vector< Value > &stack) const override |
Public Member Functions inherited from lldb_private::plugin::dwarf::SymbolFileDWARF | |
SymbolFileDWARF (lldb::ObjectFileSP objfile_sp, SectionList *dwo_section_list) | |
~SymbolFileDWARF () override | |
uint32_t | CalculateAbilities () override |
void | InitializeObject () override |
Initialize the SymbolFile object. | |
lldb::LanguageType | ParseLanguage (CompileUnit &comp_unit) override |
XcodeSDK | ParseXcodeSDK (CompileUnit &comp_unit) override |
Return the Xcode SDK comp_unit was compiled against. | |
size_t | ParseFunctions (CompileUnit &comp_unit) override |
bool | ParseLineTable (CompileUnit &comp_unit) override |
bool | ParseDebugMacros (CompileUnit &comp_unit) override |
bool | ForEachExternalModule (CompileUnit &, llvm::DenseSet< SymbolFile * > &, llvm::function_ref< bool(Module &)>) override |
bool | ParseSupportFiles (CompileUnit &comp_unit, SupportFileList &support_files) override |
bool | ParseIsOptimized (CompileUnit &comp_unit) override |
size_t | ParseTypes (CompileUnit &comp_unit) override |
bool | ParseImportedModules (const SymbolContext &sc, std::vector< SourceModule > &imported_modules) override |
size_t | ParseBlocksRecursive (Function &func) override |
size_t | ParseVariablesForContext (const SymbolContext &sc) override |
std::optional< ArrayInfo > | GetDynamicArrayInfoForUID (lldb::user_id_t type_uid, const ExecutionContext *exe_ctx) override |
If type_uid points to an array type, return its characteristics. | |
bool | CompleteType (CompilerType &compiler_type) override |
Type * | ResolveType (const DWARFDIE &die, bool assert_not_being_parsed=true, bool resolve_function_context=false) |
CompilerDecl | GetDeclForUID (lldb::user_id_t uid) override |
CompilerDeclContext | GetDeclContextForUID (lldb::user_id_t uid) override |
CompilerDeclContext | GetDeclContextContainingUID (lldb::user_id_t uid) override |
std::vector< CompilerContext > | GetCompilerContextForUID (lldb::user_id_t uid) override |
void | ParseDeclsForContext (CompilerDeclContext decl_ctx) override |
uint32_t | ResolveSymbolContext (const Address &so_addr, lldb::SymbolContextItem resolve_scope, SymbolContext &sc) override |
Status | CalculateFrameVariableError (StackFrame &frame) override |
Subclasses will override this function to for GetFrameVariableError(). | |
uint32_t | ResolveSymbolContext (const SourceLocationSpec &src_location_spec, lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) override |
void | FindGlobalVariables (ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, VariableList &variables) override |
void | FindGlobalVariables (const RegularExpression ®ex, uint32_t max_matches, VariableList &variables) override |
void | FindFunctions (const Module::LookupInfo &lookup_info, const CompilerDeclContext &parent_decl_ctx, bool include_inlines, SymbolContextList &sc_list) override |
void | FindFunctions (const RegularExpression ®ex, bool include_inlines, SymbolContextList &sc_list) override |
void | GetMangledNamesForFunction (const std::string &scope_qualified_name, std::vector< ConstString > &mangled_names) override |
uint64_t | GetDebugInfoSize (bool load_all_debug_info=false) override |
Metrics gathering functions. | |
void | FindTypes (const lldb_private::TypeQuery &match, lldb_private::TypeResults &results) override |
Find types using a type-matching object that contains all search parameters. | |
void | GetTypes (SymbolContextScope *sc_scope, lldb::TypeClass type_mask, TypeList &type_list) override |
llvm::Expected< lldb::TypeSystemSP > | GetTypeSystemForLanguage (lldb::LanguageType language) override |
CompilerDeclContext | FindNamespace (ConstString name, const CompilerDeclContext &parent_decl_ctx, bool only_root_namespaces) override |
Finds a namespace of name name and whose parent context is parent_decl_ctx. | |
void | PreloadSymbols () override |
std::recursive_mutex & | GetModuleMutex () const override |
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this symbol file modifies type information in. | |
llvm::StringRef | GetPluginName () override |
llvm::DWARFDebugAbbrev * | DebugAbbrev () |
DWARFDebugInfo & | DebugInfo () |
DWARFDIE | GetDeclContextDIEContainingDIE (const DWARFDIE &die) |
bool | HasForwardDeclForCompilerType (const CompilerType &compiler_type) |
CompileUnit * | GetCompUnitForDWARFCompUnit (DWARFCompileUnit &dwarf_cu) |
virtual void | GetObjCMethods (ConstString class_name, llvm::function_ref< IterationAction(DWARFDIE die)> callback) |
DebugMacrosSP | ParseDebugMacros (lldb::offset_t *offset) |
lldb::ModuleSP | GetExternalModule (ConstString name) |
const ExternalTypeModuleMap & | getExternalTypeModules () const |
Return the list of Clang modules imported by this SymbolFile. | |
virtual SymbolFileDWARF * | GetDIERefSymbolFile (const DIERef &die_ref) |
Given a DIERef, find the correct SymbolFileDWARF. | |
virtual DWARFDIE | GetDIE (const DIERef &die_ref) |
DWARFDIE | GetDIE (lldb::user_id_t uid) |
std::shared_ptr< SymbolFileDWARFDwo > | GetDwoSymbolFileForCompileUnit (DWARFUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die) |
std::optional< uint64_t > | GetDWOId () |
If this is a DWARF object with a single CU, return its DW_AT_dwo_id. | |
DWARFUnit * | GetSkeletonUnit (DWARFUnit *dwo_unit) |
Given a DWO DWARFUnit, find the corresponding skeleton DWARFUnit in the main symbol file. | |
std::vector< std::unique_ptr< CallEdge > > | ParseCallEdgesInFunction (UserID func_id) override |
void | Dump (Stream &s) override |
void | DumpClangAST (Stream &s, llvm::StringRef filter, bool show_colors) override |
bool | GetSeparateDebugInfo (StructuredData::Dictionary &d, bool errors_only, bool load_all_debug_info=false) override |
List separate dwo files. | |
DWOStats | GetDwoStats () override |
Gets statistics about dwo files associated with this symbol file. | |
DWARFContext & | GetDWARFContext () |
const std::shared_ptr< SymbolFileDWARFDwo > & | GetDwpSymbolFile () |
FileSpec | GetFile (DWARFUnit &unit, size_t file_idx) |
StatsDuration::Duration | GetDebugInfoParseTime () override |
Return the time taken to parse the debug information. | |
StatsDuration::Duration | GetDebugInfoIndexTime () override |
Return the time it took to index the debug information in the object file. | |
StatsDuration & | GetDebugInfoParseTimeRef () |
void | ResetStatistics () override |
Reset the statistics for the symbol file. | |
ConstString | ConstructFunctionDemangledName (const DWARFDIE &die) |
std::optional< uint64_t > | GetFileIndex () const |
void | SetFileIndex (std::optional< uint64_t > file_index) |
virtual llvm::DenseMap< const DWARFDebugInfoEntry *, Type * > & | GetDIEToType () |
virtual llvm::DenseMap< lldb::opaque_compiler_type_t, DIERef > & | GetForwardDeclCompilerTypeToDIE () |
virtual DIEToVariableSP & | GetDIEToVariable () |
virtual UniqueDWARFASTTypeMap & | GetUniqueDWARFASTTypeMap () |
bool | ClassOrStructIsVirtual (const DWARFDIE &die) |
SymbolFileDWARFDebugMap * | GetDebugMapSymfile () |
virtual DWARFDIE | FindDefinitionDIE (const DWARFDIE &die) |
virtual lldb::TypeSP | FindCompleteObjCDefinitionTypeForDIE (const DWARFDIE &die, ConstString type_name, bool must_be_implementation) |
Type * | ResolveTypeUID (lldb::user_id_t type_uid) override |
Type * | ResolveTypeUID (const DWARFDIE &die, bool assert_not_being_parsed) |
Type * | ResolveTypeUID (const DIERef &die_ref) |
DWARFIndex * | getIndex () |
Returns the DWARFIndex for this symbol, if it exists. | |
bool | isA (const void *ClassID) const override |
LLVM RTTI support. | |
Public Member Functions inherited from lldb_private::SymbolFileCommon | |
SymbolFileCommon (lldb::ObjectFileSP objfile_sp) | |
~SymbolFileCommon () override=default | |
uint32_t | GetAbilities () override |
Get a mask of what this symbol file supports for the object file that it was constructed with. | |
Symtab * | GetSymtab (bool can_create=true) override |
ObjectFile * | GetObjectFile () override |
const ObjectFile * | GetObjectFile () const override |
ObjectFile * | GetMainObjectFile () override |
void | SectionFileAddressesChanged () override |
Notify the SymbolFile that the file addresses in the Sections for this module have been changed. | |
uint32_t | GetNumCompileUnits () override |
lldb::CompUnitSP | GetCompileUnitAtIndex (uint32_t idx) override |
bool | GetDebugInfoIndexWasLoadedFromCache () const override |
Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module index cache. | |
void | SetDebugInfoIndexWasLoadedFromCache () override |
bool | GetDebugInfoIndexWasSavedToCache () const override |
void | SetDebugInfoIndexWasSavedToCache () override |
bool | GetDebugInfoHadFrameVariableErrors () const override |
Accessors for the bool that indicates if there was debug info, but errors stopped variables from being able to be displayed correctly. | |
void | SetDebugInfoHadFrameVariableErrors () override |
lldb::TypeSP | MakeType (lldb::user_id_t uid, ConstString name, std::optional< uint64_t > byte_size, SymbolContextScope *context, lldb::user_id_t encoding_uid, Type::EncodingDataType encoding_uid_type, const Declaration &decl, const CompilerType &compiler_qual_type, Type::ResolveState compiler_type_resolve_state, uint32_t opaque_payload=0) override |
This function is used to create types that belong to a SymbolFile. | |
lldb::TypeSP | CopyType (const lldb::TypeSP &other_type) override |
Public Member Functions inherited from lldb_private::SymbolFile | |
SymbolFile ()=default | |
~SymbolFile () override=default | |
virtual SymbolFile * | GetBackingSymbolFile () |
SymbolFileOnDemand class overrides this to return the underlying backing SymbolFile implementation that loads on-demand. | |
virtual bool | GetLoadDebugInfoEnabled () |
Whether debug info will be loaded or not. | |
virtual void | SetLoadDebugInfoEnabled () |
Specify debug info should be loaded. | |
virtual llvm::SmallSet< lldb::LanguageType, 4 > | ParseAllLanguages (CompileUnit &comp_unit) |
This function exists because SymbolFileDWARFDebugMap may extra compile units which aren't exposed as "real" compile units. | |
virtual bool | ForEachExternalModule (lldb_private::CompileUnit &comp_unit, llvm::DenseSet< lldb_private::SymbolFile * > &visited_symbol_files, llvm::function_ref< bool(Module &)> lambda) |
Apply a lambda to each external lldb::Module referenced by this comp_unit . | |
Status | GetFrameVariableError (StackFrame &frame) |
Get an error that describes why variables might be missing for a given symbol context. | |
virtual void | AddSymbols (Symtab &symtab) |
virtual lldb::UnwindPlanSP | GetUnwindPlan (const Address &address, const RegisterInfoResolver &resolver) |
virtual llvm::Expected< lldb::addr_t > | GetParameterStackSize (Symbol &symbol) |
Return the number of stack bytes taken up by the parameters to this function. | |
virtual ModuleList | GetDebugInfoModules () |
Get the additional modules that this symbol file uses to parse debug info. | |
std::unordered_map< lldb::CompUnitSP, Args > | GetCompileOptions () |
Returns a map of compilation unit to the compile option arguments associated with that compilation unit. | |
std::string | GetObjectName () const |
Public Member Functions inherited from lldb_private::PluginInterface | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Definition at line 16 of file SymbolFileWasm.h.
SymbolFileWasm::SymbolFileWasm | ( | lldb::ObjectFileSP | objfile_sp, |
SectionList * | dwo_section_list ) |
Definition at line 18 of file SymbolFileWasm.cpp.
References lldb_private::plugin::dwarf::SymbolFileDWARF::SymbolFileDWARF().
|
overridedefault |
|
overridevirtual |
Reimplemented from lldb_private::plugin::dwarf::SymbolFileDWARF.
Definition at line 25 of file SymbolFileWasm.cpp.
References lldb_private::DataExtractor::GetU32(), lldb_private::DataExtractor::GetU8(), lldb_private::DataExtractor::GetULEB128(), and LLDB_INVALID_OFFSET.
|
overridevirtual |
DWARF Location Index | WebAssembly Construct |
---|---|
0 | Local |
1 or 3 | Global |
2 | Operand Stack |
Reimplemented from lldb_private::plugin::dwarf::SymbolFileDWARF.
Definition at line 49 of file SymbolFileWasm.cpp.
References lldb_private::DebugInfo, error(), lldb_private::eWasmTagGlobal, lldb_private::eWasmTagLocal, lldb_private::eWasmTagNotAWasmLocation, lldb_private::eWasmTagOperandStack, lldb_private::GetLog(), lldb_private::DataExtractor::GetU32(), lldb_private::DataExtractor::GetU8(), lldb_private::DataExtractor::GetULEB128(), lldb_private::GetWasmRegister(), LLDB_LOG_ERROR, and lldb_private::DWARFExpression::ReadRegisterValueAsScalar().