class Index
Defined at line 35 of file ../../src/developer/debug/zxdb/symbols/index.h
Public Methods
void Index ()
Defined at line 37 of file ../../src/developer/debug/zxdb/symbols/index.h
void ~Index ()
Defined at line 38 of file ../../src/developer/debug/zxdb/symbols/index.h
const std::vector<SkeletonUnit> & dwo_refs ()
Returns the information on the .dwo files that are referenced by this binary.
Defined at line 41 of file ../../src/developer/debug/zxdb/symbols/index.h
const std::vector<IndexNode::SymbolRef> & main_functions ()
See main_functions_ below.
Defined at line 80 of file ../../src/developer/debug/zxdb/symbols/index.h
std::vector<IndexNode::SymbolRef> & main_functions ()
Defined at line 81 of file ../../src/developer/debug/zxdb/symbols/index.h
const IndexNode & root ()
Defined at line 83 of file ../../src/developer/debug/zxdb/symbols/index.h
IndexNode & root ()
Defined at line 84 of file ../../src/developer/debug/zxdb/symbols/index.h
size_t files_indexed ()
Defined at line 86 of file ../../src/developer/debug/zxdb/symbols/index.h
void CreateIndex (DwarfBinary & binary, int32_t dwo_index, bool force_slow_path)
Creates an index for one binary file. If there are skeleton units (references to separate .dwo
files with the symbols for individual source files), those are collected in dwo_refs() and NOT
indexed (the ModuleSymbols needs to have the ownership of the binaries so needs to create
these). They should be separately indexed and merged into this index.
Normal callers will want to use the fast path (which internally falls back to the slow path
for cross unit references). Tests can set the force_slow_path flag to cause everything to be
indexed with the slow path for validation purposes.
Defined at line 631 of file ../../src/developer/debug/zxdb/symbols/index.cc
void DumpFileIndex (std::ostream & out)
Dumps the file index to the stream for debugging.
Defined at line 652 of file ../../src/developer/debug/zxdb/symbols/index.cc
std::vector<IndexNode::SymbolRef> FindExact (const Identifier & input)
Takes a fully-qualified name with namespaces and classes and template parameters and returns
the list of symbols which match exactly.
TODO(bug 36754) it would be nice if this could be deleted and all code go through
expr/find_name.h to query the index. As-is this duplicates some of FindName's logic in a less
flexible way.
Defined at line 659 of file ../../src/developer/debug/zxdb/symbols/index.cc
std::vector<std::string> FindFileMatches (std::string_view name)
Looks up the name in the file index and returns the set of matches. The name is matched from
the right side with a left boundary of either a slash or the beginning of the full path. This
may match more than one file name, and the caller is left to decide which one(s) it wants.
Defined at line 665 of file ../../src/developer/debug/zxdb/symbols/index.cc
std::vector<std::string> FindFilePrefixes (const std::string & prefix)
Same as FindFileMatches but does a prefix search. This only matches the file name component
(not directory paths).
In the future it would be nice to match directories if there was a "/".
Defined at line 682 of file ../../src/developer/debug/zxdb/symbols/index.cc
const std::vector<UnitIndex> * FindFileUnitIndices (const std::string & name)
Looks up the given exact file path and returns all compile units it appears in. The file must
be an exact match (normally it's one of the results from FindFileMatches).
Defined at line 693 of file ../../src/developer/debug/zxdb/symbols/index.cc
size_t CountSymbolsIndexed ()
Returns how many symbols are indexed. This iterates through everything so can be slow.
Defined at line 700 of file ../../src/developer/debug/zxdb/symbols/index.cc