Go to the documentation of this file.
9 #ifndef LLDB_SYMBOL_SYMTAB_H
10 #define LLDB_SYMBOL_SYMTAB_H
46 Mangled::NamePreference name_preference = Mangled::ePreferDemangled);
48 Mangled::NamePreference name_preference =
49 Mangled::ePreferDemangled)
const;
56 Debug symbol_debug_type,
65 std::vector<uint32_t> &indexes,
70 std::vector<uint32_t> &indexes,
uint32_t start_idx = 0,
73 Debug symbol_debug_type,
75 std::vector<uint32_t> &matches,
79 std::vector<uint32_t> &matches);
81 Debug symbol_debug_type,
83 std::vector<uint32_t> &matches);
86 std::vector<uint32_t> &matches);
89 Debug symbol_debug_type,
91 std::vector<uint32_t> &matches);
95 std::vector<uint32_t> &indexes);
99 std::vector<uint32_t> &indexes);
102 std::vector<uint32_t> &symbol_indexes);
105 Debug symbol_debug_type,
107 std::vector<uint32_t> &symbol_indexes);
111 std::vector<uint32_t> &symbol_indexes);
114 Debug symbol_debug_type,
124 bool remove_duplicates)
const;
131 bool add_demangled,
bool add_mangled,
153 bool &uuid_mismatch);
169 bool Encode(DataEncoder &encoder)
const;
275 std::map<lldb::FunctionNameType, UniqueCStringMap<uint32_t>>
277 mutable std::recursive_mutex
291 switch (symbol_debug_type) {
306 switch (symbol_visibility) {
337 std::vector<uint32_t> &indexes);
343 uint32_t value, std::set<const char *> &class_contexts,
344 std::vector<std::pair<NameToIndexMap::Entry, const char *>> &backlog,
348 const char *decl_context,
349 const std::set<const char *> &class_contexts);
357 #endif // LLDB_SYMBOL_SYMTAB_H
FileRangeToIndexMapCompare(const Symtab &symtab)
FileRangeToIndexMap m_file_addr_to_index
void SetWasSavedToCache()
uint32_t AppendSymbolIndexesWithTypeAndFlagsValue(lldb::SymbolType symbol_type, uint32_t flags_value, std::vector< uint32_t > &indexes, uint32_t start_idx=0, uint32_t end_index=UINT32_MAX) const
void AppendSymbolNamesToMap(const IndexCollection &indexes, bool add_demangled, bool add_mangled, NameToIndexMap &name_to_index_map) const
UniqueCStringMap< uint32_t > & GetNameToSymbolIndexMap(lldb::FunctionNameType type)
bool GetWasSavedToCache() const
const Symbol * GetParent(Symbol *symbol) const
Get the parent symbol for the given symbol.
collection::iterator iterator
RangeDataVector< lldb::addr_t, lldb::addr_t, uint32_t, 0, FileRangeToIndexMapCompare > FileRangeToIndexMap
Symtab(ObjectFile *objfile)
Symbol * SymbolAtIndex(size_t idx)
void SetWasLoadedFromCache()
std::recursive_mutex & GetMutex()
void FindFunctionSymbols(ConstString name, uint32_t name_type_mask, SymbolContextList &sc_list)
bool Encode(DataEncoder &encoder) const
Encode this object into a data encoder object.
UniqueCStringMap< uint32_t > NameToIndexMap
Symbol * FindFirstSymbolWithNameAndType(ConstString name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility)
std::recursive_mutex m_mutex
bool LoadFromCache()
Load the symbol table from the index cache.
std::map< lldb::FunctionNameType, UniqueCStringMap< uint32_t > > m_name_to_symbol_indices
Maps function names to symbol indices (grouped by FunctionNameTypes)
void Dump(Stream *s, Target *target, SortOrder sort_type, Mangled::NamePreference name_preference=Mangled::ePreferDemangled)
static void DumpSymbolHeader(Stream *s)
int rank(const uint32_t data) const
uint32_t GetNameIndexes(ConstString symbol_name, std::vector< uint32_t > &indexes)
A helper function that looks up full function names.
bool m_file_addr_to_index_computed
Symbol * FindSymbolContainingFileAddress(lldb::addr_t file_addr)
void SaveToCache()
Save the symbol table data out into a cache.
collection::const_iterator const_iterator
uint32_t GetIndexForSymbol(const Symbol *symbol) const
void InitAddressIndexes()
Symbol * FindSymbolWithType(lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx)
string(SUBSTRING ${p} 10 -1 pStripped) if($
Symbol * FindSymbolAtFileAddress(lldb::addr_t file_addr)
void RegisterBacklogEntry(const NameToIndexMap::Entry &entry, const char *decl_context, const std::set< const char * > &class_contexts)
size_t GetNumSymbols() const
void Reserve(size_t count)
uint32_t AddSymbol(const Symbol &symbol)
bool CheckSymbolAtIndex(size_t idx, Debug symbol_debug_type, Visibility symbol_visibility) const
Uniform wrapper for access to rich mangling information from different providers.
uint32_t AppendSymbolIndexesWithType(lldb::SymbolType symbol_type, std::vector< uint32_t > &indexes, uint32_t start_idx=0, uint32_t end_index=UINT32_MAX) const
uint32_t AppendSymbolIndexesWithName(ConstString symbol_name, std::vector< uint32_t > &matches)
const Symtab & operator=(const Symtab &)=delete
bool operator()(const uint32_t a_data, const uint32_t b_data) const
Symbol * FindSymbolByID(lldb::user_id_t uid) const
bool GetWasLoadedFromCache() const
Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module...
bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr, bool &uuid_mismatch)
Decode a serialized version of this object from data.
uint32_t AppendSymbolIndexesWithNameAndType(ConstString symbol_name, lldb::SymbolType symbol_type, std::vector< uint32_t > &matches)
void SectionFileAddressesChanged()
std::string GetCacheKey()
Get the cache key string for this symbol table.
void RegisterMangledNameEntry(uint32_t value, std::set< const char * > &class_contexts, std::vector< std::pair< NameToIndexMap::Entry, const char * >> &backlog, RichManglingContext &rmc)
A class that represents a running process on the host machine.
uint32_t AppendSymbolIndexesMatchingRegExAndType(const RegularExpression ®ex, lldb::SymbolType symbol_type, std::vector< uint32_t > &indexes)
void FindAllSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, std::vector< uint32_t > &symbol_indexes)
void SortSymbolIndexesByValue(std::vector< uint32_t > &indexes, bool remove_duplicates) const
bool m_name_indexes_computed
Symbol * Resize(size_t count)
std::vector< Symbol > collection
std::vector< uint32_t > IndexCollection
ObjectFile * GetObjectFile() const
void FindAllSymbolsMatchingRexExAndType(const RegularExpression ®ex, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector< uint32_t > &symbol_indexes)
void SymbolIndicesToSymbolContextList(std::vector< uint32_t > &symbol_indexes, SymbolContextList &sc_list)
void ForEachSymbolContainingFileAddress(lldb::addr_t file_addr, std::function< bool(Symbol *)> const &callback)