LLDB  mainline
Public Member Functions | Protected Attributes | List of all members
lldb_private::Module::LookupInfo Class Reference

#include "lldb/Core/Module.h"

Collaboration diagram for lldb_private::Module::LookupInfo:
Collaboration graph
[legend]

Public Member Functions

 LookupInfo ()
 
 LookupInfo (ConstString name, lldb::FunctionNameType name_type_mask, lldb::LanguageType language)
 
ConstString GetName () const
 
void SetName (ConstString name)
 
ConstString GetLookupName () const
 
void SetLookupName (ConstString name)
 
lldb::FunctionNameType GetNameTypeMask () const
 
void SetNameTypeMask (lldb::FunctionNameType mask)
 
void Prune (SymbolContextList &sc_list, size_t start_idx) const
 

Protected Attributes

ConstString m_name
 What the user originally typed. More...
 
ConstString m_lookup_name
 The actual name will lookup when calling in the object or symbol file. More...
 
lldb::LanguageType m_language = lldb::eLanguageTypeUnknown
 Limit matches to only be for this language. More...
 
lldb::FunctionNameType m_name_type_mask = lldb::eFunctionNameTypeNone
 One or more bits from lldb::FunctionNameType that indicate what kind of names we are looking for. More...
 
bool m_match_name_after_lookup = false
 

Detailed Description

A class that encapsulates name lookup information.

Users can type a wide variety of partial names when setting breakpoints by name or when looking for functions by name. The SymbolFile object is only required to implement name lookup for function basenames and for fully mangled names. This means if the user types in a partial name, we must reduce this to a name lookup that will work with all SymbolFile objects. So we might reduce a name lookup to look for a basename, and then prune out any results that don't match.

The "m_name" member variable represents the name as it was typed by the user. "m_lookup_name" will be the name we actually search for through the symbol or objects files. Lanaguage is included in case we need to filter results by language at a later date. The "m_name_type_mask" member variable tells us what kinds of names we are looking for and can help us prune out unwanted results.

Function lookups are done in Module.cpp, ModuleList.cpp and in BreakpointResolverName.cpp and they all now use this class to do lookups correctly.

Definition at line 894 of file Module.h.

Constructor & Destructor Documentation

◆ LookupInfo() [1/2]

lldb_private::Module::LookupInfo::LookupInfo ( )
inline

Definition at line 896 of file Module.h.

◆ LookupInfo() [2/2]

lldb_private::Module::LookupInfo::LookupInfo ( ConstString  name,
lldb::FunctionNameType  name_type_mask,
lldb::LanguageType  language 
)

Member Function Documentation

◆ GetLookupName()

ConstString lldb_private::Module::LookupInfo::GetLookupName ( ) const
inline

Definition at line 905 of file Module.h.

References m_lookup_name.

Referenced by lldb_private::ModuleList::FindFunctionSymbols().

◆ GetName()

ConstString lldb_private::Module::LookupInfo::GetName ( ) const
inline

Definition at line 901 of file Module.h.

References m_name.

◆ GetNameTypeMask()

lldb::FunctionNameType lldb_private::Module::LookupInfo::GetNameTypeMask ( ) const
inline

Definition at line 909 of file Module.h.

References m_name_type_mask.

Referenced by lldb_private::ModuleList::FindFunctionSymbols().

◆ Prune()

void Module::LookupInfo::Prune ( SymbolContextList sc_list,
size_t  start_idx 
) const

◆ SetLookupName()

void lldb_private::Module::LookupInfo::SetLookupName ( ConstString  name)
inline

Definition at line 907 of file Module.h.

References m_lookup_name.

Referenced by lldb_private::BreakpointResolverName::AddNameLookup().

◆ SetName()

void lldb_private::Module::LookupInfo::SetName ( ConstString  name)
inline

Definition at line 903 of file Module.h.

References m_name.

◆ SetNameTypeMask()

void lldb_private::Module::LookupInfo::SetNameTypeMask ( lldb::FunctionNameType  mask)
inline

Definition at line 911 of file Module.h.

References m_name_type_mask.

Member Data Documentation

◆ m_language

lldb::LanguageType lldb_private::Module::LookupInfo::m_language = lldb::eLanguageTypeUnknown
protected

Limit matches to only be for this language.

Definition at line 925 of file Module.h.

◆ m_lookup_name

ConstString lldb_private::Module::LookupInfo::m_lookup_name
protected

The actual name will lookup when calling in the object or symbol file.

Definition at line 922 of file Module.h.

Referenced by GetLookupName(), and SetLookupName().

◆ m_match_name_after_lookup

bool lldb_private::Module::LookupInfo::m_match_name_after_lookup = false
protected

Definition at line 933 of file Module.h.

Referenced by Prune().

◆ m_name

ConstString lldb_private::Module::LookupInfo::m_name
protected

What the user originally typed.

Definition at line 919 of file Module.h.

Referenced by GetName(), Prune(), and SetName().

◆ m_name_type_mask

lldb::FunctionNameType lldb_private::Module::LookupInfo::m_name_type_mask = lldb::eFunctionNameTypeNone
protected

One or more bits from lldb::FunctionNameType that indicate what kind of names we are looking for.

If true, then demangled names that match will need to contain "m_name" in order to be considered a match

Definition at line 929 of file Module.h.

Referenced by GetNameTypeMask(), Prune(), and SetNameTypeMask().


The documentation for this class was generated from the following files: