29 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
33 if (!(name_type_mask & eFunctionNameTypeFull)) {
36 name_to_match_against =
ConstString(mangled_die_name);
41 name_to_match_against = demangled_die_name;
51 uint32_t looking_for_nonmethods =
52 name_type_mask & ~(eFunctionNameTypeMethod | eFunctionNameTypeSelector);
53 if (!looking_for_nonmethods && parent_decl_ctx.
IsValid())
62 if (name_type_mask & eFunctionNameTypeFull && die.
GetMangledName() == name)
67 if (name_type_mask & eFunctionNameTypeSelector &&
71 bool looking_for_methods = name_type_mask & lldb::eFunctionNameTypeMethod;
72 bool looking_for_functions = name_type_mask & lldb::eFunctionNameTypeBase;
73 if (looking_for_methods || looking_for_functions) {
77 if ((looking_for_methods && looking_for_functions) ||
78 looking_for_methods == die.
IsMethod())
90 index.m_module.GetSymbolFile()->GetBackingSymbolFile())),
91 m_callback(callback), m_name(name) {}
95 return m_callback(die);
96 m_index.ReportInvalidDIERef(ref, m_name);
101 const llvm::AppleAcceleratorTable::Entry &entry)
const {
103 *entry.getDIESectionOffset()));
108 "the DWARF debug information has been modified (accelerator table had "
109 "bad die {0:x16} for '{1}')\n",
115 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
123 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
125 if (dwarf_decl_ctx == context)
126 return callback(die);
Represents a generic declaration context in a program.
A uniqued constant string class.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
A class that encapsulates name lookup information.
lldb::FunctionNameType GetNameTypeMask() const
lldb::LanguageType GetLanguageType() const
ConstString GetLookupName() const
bool NameMatchesLookupInfo(ConstString function_name, lldb::LanguageType language_type=lldb::eLanguageTypeUnknown) const
void ReportErrorIfModifyDetected(const char *format, Args &&...args)
static bool IsPossibleObjCMethodName(const char *name)
Identifies a DWARF debug info entry within a given Module.
dw_offset_t die_offset() const
SymbolFileDWARF * GetDWARF() const
void GetName(Stream &s) const
const char * GetMangledName() const
DWARFDIE GetDIE(dw_offset_t die_offset) const
DWARFDeclContext GetDWARFDeclContext() const
bool operator()(DIERef ref) const
DIERefCallbackImpl(const DWARFIndex &index, llvm::function_ref< bool(DWARFDIE die)> callback, llvm::StringRef name)
virtual void GetTypes(ConstString name, llvm::function_ref< bool(DWARFDIE die)> callback)=0
bool ProcessFunctionDIE(const Module::LookupInfo &lookup_info, DWARFDIE die, const CompilerDeclContext &parent_decl_ctx, llvm::function_ref< bool(DWARFDIE die)> callback)
Helper function implementing common logic for processing function dies.
virtual void GetFullyQualifiedType(const DWARFDeclContext &context, llvm::function_ref< bool(DWARFDIE die)> callback)
Finds all DIEs whose fully qualified name matches context.
void ReportInvalidDIERef(DIERef ref, llvm::StringRef name) const
bool GetFullyQualifiedTypeImpl(const DWARFDeclContext &context, DWARFDIE die, llvm::function_ref< bool(DWARFDIE die)> callback)
Implementation of GetFullyQualifiedType to check a single entry, shareable with derived classes.
ConstString ConstructFunctionDemangledName(const DWARFDIE &die)
static bool DIEInDeclContext(const CompilerDeclContext &parent_decl_ctx, const DWARFDIE &die, bool only_root_namespaces=false)
A class that represents a running process on the host machine.