LLDB  mainline
Symtab.h
Go to the documentation of this file.
1 //===-- Symtab.h ------------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SYMBOL_SYMTAB_H
10 #define LLDB_SYMBOL_SYMTAB_H
11 
13 #include "lldb/Symbol/Symbol.h"
14 #include "lldb/Utility/RangeMap.h"
15 #include "lldb/lldb-private.h"
16 #include <map>
17 #include <mutex>
18 #include <vector>
19 
20 namespace lldb_private {
21 
22 class Symtab {
23 public:
24  typedef std::vector<uint32_t> IndexCollection;
26 
27  enum Debug {
28  eDebugNo, // Not a debug symbol
29  eDebugYes, // A debug symbol
31  };
32 
34 
35  Symtab(ObjectFile *objfile);
36  ~Symtab();
37 
38  void PreloadSymbols();
39  void Reserve(size_t count);
40  Symbol *Resize(size_t count);
41  uint32_t AddSymbol(const Symbol &symbol);
42  size_t GetNumSymbols() const;
44  void
45  Dump(Stream *s, Target *target, SortOrder sort_type,
46  Mangled::NamePreference name_preference = Mangled::ePreferDemangled);
47  void Dump(Stream *s, Target *target, std::vector<uint32_t> &indexes,
48  Mangled::NamePreference name_preference =
49  Mangled::ePreferDemangled) const;
50  uint32_t GetIndexForSymbol(const Symbol *symbol) const;
51  std::recursive_mutex &GetMutex() { return m_mutex; }
53  Symbol *SymbolAtIndex(size_t idx);
54  const Symbol *SymbolAtIndex(size_t idx) const;
56  Debug symbol_debug_type,
57  Visibility symbol_visibility, uint32_t &start_idx);
58  /// Get the parent symbol for the given symbol.
59  ///
60  /// Many symbols in symbol tables are scoped by other symbols that
61  /// contain one or more symbol. This function will look for such a
62  /// containing symbol and return it if there is one.
63  const Symbol *GetParent(Symbol *symbol) const;
65  std::vector<uint32_t> &indexes,
66  uint32_t start_idx = 0,
67  uint32_t end_index = UINT32_MAX) const;
69  lldb::SymbolType symbol_type, uint32_t flags_value,
70  std::vector<uint32_t> &indexes, uint32_t start_idx = 0,
71  uint32_t end_index = UINT32_MAX) const;
73  Debug symbol_debug_type,
74  Visibility symbol_visibility,
75  std::vector<uint32_t> &matches,
76  uint32_t start_idx = 0,
77  uint32_t end_index = UINT32_MAX) const;
79  std::vector<uint32_t> &matches);
81  Debug symbol_debug_type,
82  Visibility symbol_visibility,
83  std::vector<uint32_t> &matches);
85  lldb::SymbolType symbol_type,
86  std::vector<uint32_t> &matches);
88  lldb::SymbolType symbol_type,
89  Debug symbol_debug_type,
90  Visibility symbol_visibility,
91  std::vector<uint32_t> &matches);
92  uint32_t
94  lldb::SymbolType symbol_type,
95  std::vector<uint32_t> &indexes);
97  const RegularExpression &regex, lldb::SymbolType symbol_type,
98  Debug symbol_debug_type, Visibility symbol_visibility,
99  std::vector<uint32_t> &indexes);
101  lldb::SymbolType symbol_type,
102  std::vector<uint32_t> &symbol_indexes);
104  lldb::SymbolType symbol_type,
105  Debug symbol_debug_type,
106  Visibility symbol_visibility,
107  std::vector<uint32_t> &symbol_indexes);
109  const RegularExpression &regex, lldb::SymbolType symbol_type,
110  Debug symbol_debug_type, Visibility symbol_visibility,
111  std::vector<uint32_t> &symbol_indexes);
113  lldb::SymbolType symbol_type,
114  Debug symbol_debug_type,
115  Visibility symbol_visibility);
119  lldb::addr_t file_addr, std::function<bool(Symbol *)> const &callback);
120  void FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
121  SymbolContextList &sc_list);
122 
123  void SortSymbolIndexesByValue(std::vector<uint32_t> &indexes,
124  bool remove_duplicates) const;
125 
126  static void DumpSymbolHeader(Stream *s);
127 
128  void Finalize();
129 
130  void AppendSymbolNamesToMap(const IndexCollection &indexes,
131  bool add_demangled, bool add_mangled,
132  NameToIndexMap &name_to_index_map) const;
133 
134  ObjectFile *GetObjectFile() const { return m_objfile; }
135 
136  /// Decode a serialized version of this object from data.
137  ///
138  /// \param data
139  /// The decoder object that references the serialized data.
140  ///
141  /// \param offset_ptr
142  /// A pointer that contains the offset from which the data will be decoded
143  /// from that gets updated as data gets decoded.
144  ///
145  /// \param[out] uuid_mismatch
146  /// Set to true if a cache file exists but the UUID didn't match, false
147  /// otherwise.
148  ///
149  /// \return
150  /// True if the symbol table is successfully decoded and can be used,
151  /// false otherwise.
152  bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr,
153  bool &uuid_mismatch);
154 
155  /// Encode this object into a data encoder object.
156  ///
157  /// This allows this object to be serialized to disk. The object file must
158  /// have a valid Signature in order to be serialized as it is used to make
159  /// sure the cached information matches when cached data is loaded at a later
160  /// time. If the object file doesn't have a valid signature false will be
161  /// returned and it will indicate we should not cache this data.
162  ///
163  /// \param encoder
164  /// A data encoder object that serialized bytes will be encoded into.
165  ///
166  /// \return
167  /// True if the symbol table's object file can generate a valid signature
168  /// and all data for the symbol table was encoded, false otherwise.
169  bool Encode(DataEncoder &encoder) const;
170 
171  /// Get the cache key string for this symbol table.
172  ///
173  /// The cache key must start with the module's cache key and is followed
174  /// by information that indicates this key is for caching the symbol table
175  /// contents and should also include the has of the object file. A module can
176  /// be represented by an ObjectFile object for the main executable, but can
177  /// also have a symbol file that is from the same or a different object file.
178  /// This means we might have two symbol tables cached in the index cache, one
179  /// for the main executable and one for the symbol file.
180  ///
181  /// \return
182  /// The unique cache key used to save and retrieve data from the index cache.
184 
185  /// Save the symbol table data out into a cache.
186  ///
187  /// The symbol table will only be saved to a cache file if caching is enabled.
188  ///
189  /// We cache the contents of the symbol table since symbol tables in LLDB take
190  /// some time to initialize. This is due to the many sources for data that are
191  /// used to create a symbol table:
192  /// - standard symbol table
193  /// - dynamic symbol table (ELF)
194  /// - compressed debug info sections
195  /// - unwind information
196  /// - function pointers found in runtimes for global constructor/destructors
197  /// - other sources.
198  /// All of the above sources are combined and one symbol table results after
199  /// all sources have been considered.
200  void SaveToCache();
201 
202  /// Load the symbol table from the index cache.
203  ///
204  /// Quickly load the finalized symbol table from the index cache. This saves
205  /// time when the debugger starts up. The index cache file for the symbol
206  /// table has the modification time set to the same time as the main module.
207  /// If the cache file exists and the modification times match, we will load
208  /// the symbol table from the serlized cache file.
209  ///
210  /// \return
211  /// True if the symbol table was successfully loaded from the index cache,
212  /// false if the symbol table wasn't cached or was out of date.
213  bool LoadFromCache();
214 
215 
216  /// Accessors for the bool that indicates if the debug info index was loaded
217  /// from, or saved to the module index cache.
218  ///
219  /// In statistics it is handy to know if a module's debug info was loaded from
220  /// or saved to the cache. When the debug info index is loaded from the cache
221  /// startup times can be faster. When the cache is enabled and the debug info
222  /// index is saved to the cache, debug sessions can be slower. These accessors
223  /// can be accessed by the statistics and emitted to help track these costs.
224  /// \{
225  bool GetWasLoadedFromCache() const {
226  return m_loaded_from_cache;
227  }
229  m_loaded_from_cache = true;
230  }
231  bool GetWasSavedToCache() const {
232  return m_saved_to_cache;
233  }
235  m_saved_to_cache = true;
236  }
237  /// \}
238 
239 protected:
240  typedef std::vector<Symbol> collection;
241  typedef collection::iterator iterator;
242  typedef collection::const_iterator const_iterator;
244  public:
245  FileRangeToIndexMapCompare(const Symtab &symtab) : m_symtab(symtab) {}
246  bool operator()(const uint32_t a_data, const uint32_t b_data) const {
247  return rank(a_data) > rank(b_data);
248  }
249 
250  private:
251  // How much preferred is this symbol?
252  int rank(const uint32_t data) const {
253  const Symbol &symbol = *m_symtab.SymbolAtIndex(data);
254  if (symbol.IsExternal())
255  return 3;
256  if (symbol.IsWeak())
257  return 2;
258  if (symbol.IsDebug())
259  return 0;
260  return 1;
261  }
262  const Symtab &m_symtab;
263  };
267  void InitNameIndexes();
268  void InitAddressIndexes();
269 
273 
274  /// Maps function names to symbol indices (grouped by FunctionNameTypes)
275  std::map<lldb::FunctionNameType, UniqueCStringMap<uint32_t>>
277  mutable std::recursive_mutex
278  m_mutex; // Provide thread safety for this symbol table
281 
282 private:
284  GetNameToSymbolIndexMap(lldb::FunctionNameType type) {
285  auto map = m_name_to_symbol_indices.find(type);
286  assert(map != m_name_to_symbol_indices.end());
287  return map->second;
288  }
289  bool CheckSymbolAtIndex(size_t idx, Debug symbol_debug_type,
290  Visibility symbol_visibility) const {
291  switch (symbol_debug_type) {
292  case eDebugNo:
293  if (m_symbols[idx].IsDebug())
294  return false;
295  break;
296 
297  case eDebugYes:
298  if (!m_symbols[idx].IsDebug())
299  return false;
300  break;
301 
302  case eDebugAny:
303  break;
304  }
305 
306  switch (symbol_visibility) {
307  case eVisibilityAny:
308  return true;
309 
310  case eVisibilityExtern:
311  return m_symbols[idx].IsExternal();
312 
313  case eVisibilityPrivate:
314  return !m_symbols[idx].IsExternal();
315  }
316  return false;
317  }
318 
319  /// A helper function that looks up full function names.
320  ///
321  /// We generate unique names for synthetic symbols so that users can look
322  /// them up by name when needed. But because doing so is uncommon in normal
323  /// debugger use, we trade off some performance at lookup time for faster
324  /// symbol table building by detecting these symbols and generating their
325  /// names lazily, rather than adding them to the normal symbol indexes. This
326  /// function does the job of first consulting the name indexes, and if that
327  /// fails it extracts the information it needs from the synthetic name and
328  /// locates the symbol.
329  ///
330  /// @param[in] symbol_name The symbol name to search for.
331  ///
332  /// @param[out] indexes The vector if symbol indexes to update with results.
333  ///
334  /// @returns The number of indexes added to the index vector. Zero if no
335  /// matches were found.
336  uint32_t GetNameIndexes(ConstString symbol_name,
337  std::vector<uint32_t> &indexes);
338 
339  void SymbolIndicesToSymbolContextList(std::vector<uint32_t> &symbol_indexes,
340  SymbolContextList &sc_list);
341 
343  uint32_t value, std::set<const char *> &class_contexts,
344  std::vector<std::pair<NameToIndexMap::Entry, const char *>> &backlog,
345  RichManglingContext &rmc);
346 
348  const char *decl_context,
349  const std::set<const char *> &class_contexts);
350 
351  Symtab(const Symtab &) = delete;
352  const Symtab &operator=(const Symtab &) = delete;
353 };
354 
355 } // namespace lldb_private
356 
357 #endif // LLDB_SYMBOL_SYMTAB_H
lldb_private::Symtab::FileRangeToIndexMapCompare::FileRangeToIndexMapCompare
FileRangeToIndexMapCompare(const Symtab &symtab)
Definition: Symtab.h:245
lldb_private::Symtab::m_file_addr_to_index
FileRangeToIndexMap m_file_addr_to_index
Definition: Symtab.h:272
lldb_private::RegularExpression
Definition: RegularExpression.h:18
lldb_private::Symtab::m_objfile
ObjectFile * m_objfile
Definition: Symtab.h:270
lldb_private::Symtab::SetWasSavedToCache
void SetWasSavedToCache()
Definition: Symtab.h:234
lldb_private::Symtab::AppendSymbolIndexesWithTypeAndFlagsValue
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
Definition: Symtab.cpp:506
lldb_private::Symtab::AppendSymbolNamesToMap
void AppendSymbolNamesToMap(const IndexCollection &indexes, bool add_demangled, bool add_mangled, NameToIndexMap &name_to_index_map) const
Definition: Symtab.cpp:460
lldb_private::Symtab::GetNameToSymbolIndexMap
UniqueCStringMap< uint32_t > & GetNameToSymbolIndexMap(lldb::FunctionNameType type)
Definition: Symtab.h:284
lldb_private::Symtab::GetWasSavedToCache
bool GetWasSavedToCache() const
Definition: Symtab.h:231
lldb_private::Symbol
Definition: Symbol.h:20
lldb_private::Symtab::GetParent
const Symbol * GetParent(Symbol *symbol) const
Get the parent symbol for the given symbol.
Definition: Symtab.cpp:1149
lldb_private::Symtab::iterator
collection::iterator iterator
Definition: Symtab.h:241
lldb_private::Symtab::PreloadSymbols
void PreloadSymbols()
Definition: Symtab.cpp:455
lldb_private::Symtab::m_symbols
collection m_symbols
Definition: Symtab.h:271
lldb_private::Symtab::Debug
Debug
Definition: Symtab.h:27
lldb_private::Symtab::FileRangeToIndexMap
RangeDataVector< lldb::addr_t, lldb::addr_t, uint32_t, 0, FileRangeToIndexMapCompare > FileRangeToIndexMap
Definition: Symtab.h:266
lldb_private::Symtab::FileRangeToIndexMapCompare
Definition: Symtab.h:243
lldb_private::Symtab::~Symtab
~Symtab()
lldb_private::SymbolContextList
Definition: SymbolContext.h:379
lldb_private::Symtab::Symtab
Symtab(ObjectFile *objfile)
Definition: Symtab.cpp:34
lldb::offset_t
uint64_t offset_t
Definition: lldb-types.h:87
lldb_private::Symtab::eVisibilityPrivate
@ eVisibilityPrivate
Definition: Symtab.h:33
lldb_private::Stream
Definition: Stream.h:28
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::Symtab::SymbolAtIndex
Symbol * SymbolAtIndex(size_t idx)
Definition: Symtab.cpp:217
RangeMap.h
UniqueCStringMap.h
lldb_private::Target
Definition: Target.h:452
lldb_private::Symtab::SetWasLoadedFromCache
void SetWasLoadedFromCache()
Definition: Symtab.h:228
lldb_private::Symtab::GetMutex
std::recursive_mutex & GetMutex()
Definition: Symtab.h:51
lldb_private::Symtab::FindFunctionSymbols
void FindFunctionSymbols(ConstString name, uint32_t name_type_mask, SymbolContextList &sc_list)
Definition: Symtab.cpp:1089
lldb_private::Symtab::eDebugNo
@ eDebugNo
Definition: Symtab.h:28
lldb_private::Symtab::Encode
bool Encode(DataEncoder &encoder) const
Encode this object into a data encoder object.
Definition: Symtab.cpp:1233
lldb_private::Symtab::NameToIndexMap
UniqueCStringMap< uint32_t > NameToIndexMap
Definition: Symtab.h:25
lldb_private::Symtab::FindFirstSymbolWithNameAndType
Symbol * FindFirstSymbolWithNameAndType(ConstString name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility)
Definition: Symtab.cpp:858
lldb_private::Symtab::m_mutex
std::recursive_mutex m_mutex
Definition: Symtab.h:278
lldb_private::Symtab::eDebugYes
@ eDebugYes
Definition: Symtab.h:29
lldb_private::Symtab::LoadFromCache
bool LoadFromCache()
Load the symbol table from the index cache.
Definition: Symtab.cpp:1330
lldb_private::Symtab::m_name_to_symbol_indices
std::map< lldb::FunctionNameType, UniqueCStringMap< uint32_t > > m_name_to_symbol_indices
Maps function names to symbol indices (grouped by FunctionNameTypes)
Definition: Symtab.h:276
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb_private::Symtab::Dump
void Dump(Stream *s, Target *target, SortOrder sort_type, Mangled::NamePreference name_preference=Mangled::ePreferDemangled)
Definition: Symtab.cpp:88
lldb_private::Symtab::DumpSymbolHeader
static void DumpSymbolHeader(Stream *s)
Definition: Symtab.cpp:186
lldb_private::Symtab::Finalize
void Finalize()
Definition: Symtab.cpp:1005
lldb_private::Symtab::FileRangeToIndexMapCompare::rank
int rank(const uint32_t data) const
Definition: Symtab.h:252
lldb_private::Symtab::GetNameIndexes
uint32_t GetNameIndexes(ConstString symbol_name, std::vector< uint32_t > &indexes)
A helper function that looks up full function names.
Definition: Symtab.cpp:639
lldb_private::Symtab::m_file_addr_to_index_computed
bool m_file_addr_to_index_computed
Definition: Symtab.h:279
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::Symtab::FindSymbolContainingFileAddress
Symbol * FindSymbolContainingFileAddress(lldb::addr_t file_addr)
Definition: Symtab.cpp:1032
lldb_private::Symtab::SaveToCache
void SaveToCache()
Save the symbol table data out into a cache.
Definition: Symtab.cpp:1173
lldb_private::Symbol::IsExternal
bool IsExternal() const
Definition: Symbol.h:170
lldb_private::Symtab::const_iterator
collection::const_iterator const_iterator
Definition: Symtab.h:242
lldb_private::Symtab::eVisibilityExtern
@ eVisibilityExtern
Definition: Symtab.h:33
lldb_private::Symtab::GetIndexForSymbol
uint32_t GetIndexForSymbol(const Symbol *symbol) const
Definition: Symtab.cpp:549
lldb_private::Symtab::InitAddressIndexes
void InitAddressIndexes()
Definition: Symtab.cpp:922
lldb_private::Symtab::FindSymbolWithType
Symbol * FindSymbolWithType(lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx)
Definition: Symtab.cpp:792
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::Symtab::FindSymbolAtFileAddress
Symbol * FindSymbolAtFileAddress(lldb::addr_t file_addr)
Definition: Symtab.cpp:1017
lldb::SymbolType
SymbolType
Symbol types.
Definition: lldb-enumerations.h:612
lldb_private::UniqueCStringMap< uint32_t >
lldb_private::Symtab::RegisterBacklogEntry
void RegisterBacklogEntry(const NameToIndexMap::Entry &entry, const char *decl_context, const std::set< const char * > &class_contexts)
Definition: Symtab.cpp:437
lldb-private.h
Symbol.h
lldb_private::Symtab::GetNumSymbols
size_t GetNumSymbols() const
Definition: Symtab.cpp:77
lldb_private::Symtab::Reserve
void Reserve(size_t count)
Definition: Symtab.cpp:51
lldb_private::Symtab::InitNameIndexes
void InitNameIndexes()
Definition: Symtab.cpp:269
lldb_private::Symbol::IsDebug
bool IsDebug() const
Definition: Symbol.h:166
lldb_private::Symtab::AddSymbol
uint32_t AddSymbol(const Symbol &symbol)
Definition: Symtab.cpp:64
lldb_private::Symtab::CheckSymbolAtIndex
bool CheckSymbolAtIndex(size_t idx, Debug symbol_debug_type, Visibility symbol_visibility) const
Definition: Symtab.h:289
lldb_private::RichManglingContext
Uniform wrapper for access to rich mangling information from different providers.
Definition: RichManglingContext.h:25
lldb_private::Symtab::FileRangeToIndexMapCompare::m_symtab
const Symtab & m_symtab
Definition: Symtab.h:262
lldb_private::Symtab::AppendSymbolIndexesWithType
uint32_t AppendSymbolIndexesWithType(lldb::SymbolType symbol_type, std::vector< uint32_t > &indexes, uint32_t start_idx=0, uint32_t end_index=UINT32_MAX) const
Definition: Symtab.cpp:488
lldb_private::Symtab
Definition: Symtab.h:22
lldb_private::Symtab::AppendSymbolIndexesWithName
uint32_t AppendSymbolIndexesWithName(ConstString symbol_name, std::vector< uint32_t > &matches)
Definition: Symtab.cpp:669
uint32_t
lldb_private::Symtab::operator=
const Symtab & operator=(const Symtab &)=delete
lldb_private::RangeDataVector
Definition: RangeMap.h:397
lldb_private::Symtab::FileRangeToIndexMapCompare::operator()
bool operator()(const uint32_t a_data, const uint32_t b_data) const
Definition: Symtab.h:246
lldb_private::Symtab::FindSymbolByID
Symbol * FindSymbolByID(lldb::user_id_t uid) const
Definition: Symtab.cpp:208
lldb_private::Symtab::GetWasLoadedFromCache
bool GetWasLoadedFromCache() const
Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module...
Definition: Symtab.h:225
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
lldb_private::Symtab::Visibility
Visibility
Definition: Symtab.h:33
lldb_private::Symtab::Decode
bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr, bool &uuid_mismatch)
Decode a serialized version of this object from data.
Definition: Symtab.cpp:1280
lldb_private::Symtab::AppendSymbolIndexesWithNameAndType
uint32_t AppendSymbolIndexesWithNameAndType(ConstString symbol_name, lldb::SymbolType symbol_type, std::vector< uint32_t > &matches)
Definition: Symtab.cpp:708
lldb_private::Symtab::SectionFileAddressesChanged
void SectionFileAddressesChanged()
Definition: Symtab.cpp:82
lldb_private::SortOrder
SortOrder
Definition: lldb-private-enumerations.h:110
lldb_private::Symbol::IsWeak
bool IsWeak() const
Definition: Symbol.h:178
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
lldb_private::Symtab::GetCacheKey
std::string GetCacheKey()
Get the cache key string for this symbol table.
Definition: Symtab.cpp:1162
lldb_private::Symtab::RegisterMangledNameEntry
void RegisterMangledNameEntry(uint32_t value, std::set< const char * > &class_contexts, std::vector< std::pair< NameToIndexMap::Entry, const char * >> &backlog, RichManglingContext &rmc)
Definition: Symtab.cpp:381
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::Symtab::eVisibilityAny
@ eVisibilityAny
Definition: Symtab.h:33
lldb_private::Symtab::AppendSymbolIndexesMatchingRegExAndType
uint32_t AppendSymbolIndexesMatchingRegExAndType(const RegularExpression &regex, lldb::SymbolType symbol_type, std::vector< uint32_t > &indexes)
Definition: Symtab.cpp:746
lldb_private::Symtab::eDebugAny
@ eDebugAny
Definition: Symtab.h:30
lldb_private::Symtab::FindAllSymbolsWithNameAndType
void FindAllSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, std::vector< uint32_t > &symbol_indexes)
Definition: Symtab.cpp:812
lldb_private::Symtab::SortSymbolIndexesByValue
void SortSymbolIndexesByValue(std::vector< uint32_t > &indexes, bool remove_duplicates) const
Definition: Symtab.cpp:614
Entry
FormatEntity::Entry Entry
Definition: FormatEntity.cpp:82
lldb_private::Symtab::m_name_indexes_computed
bool m_name_indexes_computed
Definition: Symtab.h:279
lldb_private::Symtab::Resize
Symbol * Resize(size_t count)
Definition: Symtab.cpp:57
lldb_private::Symtab::collection
std::vector< Symbol > collection
Definition: Symtab.h:240
lldb_private::Symtab::m_loaded_from_cache
bool m_loaded_from_cache
Definition: Symtab.h:280
lldb_private::Symtab::IndexCollection
std::vector< uint32_t > IndexCollection
Definition: Symtab.h:24
lldb_private::Symtab::m_saved_to_cache
bool m_saved_to_cache
Definition: Symtab.h:280
lldb_private::Symtab::GetObjectFile
ObjectFile * GetObjectFile() const
Definition: Symtab.h:134
lldb_private::Symtab::FindAllSymbolsMatchingRexExAndType
void FindAllSymbolsMatchingRexExAndType(const RegularExpression &regex, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector< uint32_t > &symbol_indexes)
Definition: Symtab.cpp:848
lldb_private::Symtab::SymbolIndicesToSymbolContextList
void SymbolIndicesToSymbolContextList(std::vector< uint32_t > &symbol_indexes, SymbolContextList &sc_list)
Definition: Symtab.cpp:1071
lldb_private::ObjectFile
Definition: ObjectFile.h:60
lldb_private::Symtab::ForEachSymbolContainingFileAddress
void ForEachSymbolContainingFileAddress(lldb::addr_t file_addr, std::function< bool(Symbol *)> const &callback)
Definition: Symtab.cpp:1048