9#ifndef LLDB_SYMBOL_SYMTAB_H
10#define LLDB_SYMBOL_SYMTAB_H
56 Debug symbol_debug_type,
57 Visibility symbol_visibility, uint32_t &start_idx);
65 std::vector<uint32_t> &indexes,
66 uint32_t start_idx = 0,
70 std::vector<uint32_t> &indexes, uint32_t start_idx = 0,
73 Debug symbol_debug_type,
75 std::vector<uint32_t> &matches,
76 uint32_t start_idx = 0,
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);
94 std::vector<uint32_t> &indexes,
99 std::vector<uint32_t> &indexes,
104 std::vector<uint32_t> &symbol_indexes);
107 Debug symbol_debug_type,
109 std::vector<uint32_t> &symbol_indexes);
113 std::vector<uint32_t> &symbol_indexes,
117 Debug symbol_debug_type,
127 bool remove_duplicates)
const;
134 bool add_demangled,
bool add_mangled,
156 bool &uuid_mismatch);
249 bool operator()(
const uint32_t a_data,
const uint32_t b_data)
const {
255 int rank(
const uint32_t data)
const {
278 std::map<lldb::FunctionNameType, UniqueCStringMap<uint32_t>>
280 mutable std::recursive_mutex
294 switch (symbol_debug_type) {
309 switch (symbol_visibility) {
340 std::vector<uint32_t> &indexes);
346 uint32_t value, std::set<const char *> &class_contexts,
347 std::vector<std::pair<NameToIndexMap::Entry, const char *>> &backlog,
351 const char *decl_context,
352 const std::set<const char *> &class_contexts);
A uniqued constant string class.
An binary data encoding class.
A plug-in interface definition class for object file parsers.
Uniform wrapper for access to rich mangling information from different providers.
A stream class that can stream formatted output to a file.
Defines a list of symbol context objects.
bool operator()(const uint32_t a_data, const uint32_t b_data) const
FileRangeToIndexMapCompare(const Symtab &symtab)
int rank(const uint32_t data) const
Symbol * FindSymbolByID(lldb::user_id_t uid) const
Symbol * SymbolAtIndex(size_t idx)
Symbol * FindFirstSymbolWithNameAndType(ConstString name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility)
bool m_name_indexes_computed
void ForEachSymbolContainingFileAddress(lldb::addr_t file_addr, std::function< bool(Symbol *)> const &callback)
void AppendSymbolNamesToMap(const IndexCollection &indexes, bool add_demangled, bool add_mangled, NameToIndexMap &name_to_index_map) const
Symbol * Resize(size_t count)
collection::iterator iterator
Symbol * FindSymbolAtFileAddress(lldb::addr_t file_addr)
Symbol * FindSymbolContainingFileAddress(lldb::addr_t file_addr)
bool GetWasLoadedFromCache() const
Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module...
FileRangeToIndexMap m_file_addr_to_index
std::recursive_mutex m_mutex
Symbol * FindSymbolWithType(lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx)
void SortSymbolIndexesByValue(std::vector< uint32_t > &indexes, bool remove_duplicates) const
uint32_t AddSymbol(const Symbol &symbol)
void FindAllSymbolsMatchingRexExAndType(const RegularExpression ®ex, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector< uint32_t > &symbol_indexes, Mangled::NamePreference name_preference=Mangled::ePreferDemangled)
uint32_t GetNameIndexes(ConstString symbol_name, std::vector< uint32_t > &indexes)
A helper function that looks up full function names.
void Dump(Stream *s, Target *target, SortOrder sort_type, Mangled::NamePreference name_preference=Mangled::ePreferDemangled)
uint32_t AppendSymbolIndexesWithName(ConstString symbol_name, std::vector< uint32_t > &matches)
void RegisterBacklogEntry(const NameToIndexMap::Entry &entry, const char *decl_context, const std::set< const char * > &class_contexts)
static void DumpSymbolHeader(Stream *s)
uint32_t AppendSymbolIndexesWithType(lldb::SymbolType symbol_type, std::vector< uint32_t > &indexes, uint32_t start_idx=0, uint32_t end_index=UINT32_MAX) const
void RegisterMangledNameEntry(uint32_t value, std::set< const char * > &class_contexts, std::vector< std::pair< NameToIndexMap::Entry, const char * > > &backlog, RichManglingContext &rmc)
void SaveToCache()
Save the symbol table data out into a cache.
std::recursive_mutex & GetMutex()
void SetWasLoadedFromCache()
std::vector< uint32_t > IndexCollection
ObjectFile * GetObjectFile() const
size_t GetNumSymbols() const
const Symtab & operator=(const Symtab &)=delete
uint32_t GetIndexForSymbol(const Symbol *symbol) const
Symtab(const Symtab &)=delete
void SectionFileAddressesChanged()
bool m_file_addr_to_index_computed
bool CheckSymbolAtIndex(size_t idx, Debug symbol_debug_type, Visibility symbol_visibility) const
std::map< lldb::FunctionNameType, UniqueCStringMap< uint32_t > > m_name_to_symbol_indices
Maps function names to symbol indices (grouped by FunctionNameTypes)
void FindAllSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, std::vector< uint32_t > &symbol_indexes)
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 InitAddressIndexes()
std::string GetCacheKey()
Get the cache key string for this symbol table.
std::vector< Symbol > collection
void Reserve(size_t count)
const Symbol * GetParent(Symbol *symbol) const
Get the parent symbol for the given symbol.
bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr, bool &uuid_mismatch)
Decode a serialized version of this object from data.
RangeDataVector< lldb::addr_t, lldb::addr_t, uint32_t, 0, FileRangeToIndexMapCompare > FileRangeToIndexMap
void SetWasSavedToCache()
bool Encode(DataEncoder &encoder) const
Encode this object into a data encoder object.
bool GetWasSavedToCache() const
collection::const_iterator const_iterator
uint32_t AppendSymbolIndexesWithNameAndType(ConstString symbol_name, lldb::SymbolType symbol_type, std::vector< uint32_t > &matches)
void SymbolIndicesToSymbolContextList(std::vector< uint32_t > &symbol_indexes, SymbolContextList &sc_list)
bool LoadFromCache()
Load the symbol table from the index cache.
void FindFunctionSymbols(ConstString name, uint32_t name_type_mask, SymbolContextList &sc_list)
UniqueCStringMap< uint32_t > NameToIndexMap
UniqueCStringMap< uint32_t > & GetNameToSymbolIndexMap(lldb::FunctionNameType type)
uint32_t AppendSymbolIndexesMatchingRegExAndType(const RegularExpression ®ex, lldb::SymbolType symbol_type, std::vector< uint32_t > &indexes, Mangled::NamePreference name_preference=Mangled::ePreferDemangled)
A class that represents a running process on the host machine.