Lines Matching defs:symbol

52   // Clients should grab the mutex from this symbol table and lock it manually
58 // Clients should grab the mutex from this symbol table and lock it manually
64 uint32_t Symtab::AddSymbol(const Symbol &symbol) {
65 // Clients should grab the mutex from this symbol table and lock it manually
71 m_symbols.push_back(symbol);
122 // sorted by name. So we must make the ordered symbol list up ourselves.
127 for (const Symbol &symbol : m_symbols)
128 name_map.emplace(symbol.GetName().GetStringRef(), &symbol);
131 const Symbol *symbol = name_to_symbol.second;
133 symbol->Dump(s, target, symbol - &m_symbols[0], name_preference);
142 for (const Symbol &symbol : m_symbols)
143 size_map.emplace(symbol.GetByteSize(), &symbol);
147 const Symbol *symbol = size_to_symbol.second;
149 symbol->Dump(s, target, idx++, name_preference);
178 s->Printf("Symtab %" PRIu64 " symbol indexes (%" PRIu64 " symbols total):\n",
198 s->Indent(" Debug symbol\n");
199 s->Indent(" |Synthetic symbol\n");
222 Symbol *symbol =
225 return symbol;
229 // Clients should grab the mutex from this symbol table and lock it manually
237 // Clients should grab the mutex from this symbol table and lock it manually
316 Symbol *symbol = &m_symbols[value];
324 if (symbol->IsTrampoline() || symbol->IsSyntheticWithAutoGeneratedName())
327 // If the symbol's name string matched a Mangled::ManglingScheme, it is
329 Mangled &mangled = symbol->GetMangled();
333 if (symbol->ContainsLinkerAnnotations()) {
334 // If the symbol has linker annotations, also add the version without
341 const SymbolType type = symbol->GetType();
355 if (symbol->ContainsLinkerAnnotations()) {
356 // If the symbol has linker annotations, also add the version without
483 const Symbol *symbol = &m_symbols[value];
485 const Mangled &mangled = symbol->GetMangled();
560 uint32_t Symtab::GetIndexForSymbol(const Symbol *symbol) const {
563 if (symbol >= first_symbol && symbol < first_symbol + m_symbols.size())
564 return symbol - first_symbol;
579 // Getting from the symbol to the Address to the File Address involves some
609 // The if the values are equal, use the original symbol user ID
656 // Synthetic symbol names are not added to the name indexes, but they start
657 // with a prefix and end with a the symbol UserID. This allows users to find
664 return 0; // Not a synthetic symbol name
666 // Extract the user ID from the symbol name
670 Symbol *symbol = FindSymbolByID(uid);
671 if (symbol == nullptr)
673 const uint32_t symbol_idx = GetIndexForSymbol(symbol);
891 Symbol *symbol = SymbolAtIndex(*pos);
893 if (symbol->Compare(name, symbol_type))
894 return symbol;
971 // have a plain linker symbol with an address only, instead of debug info
981 // Use the end of the section as the default max size of the symbol
996 // Take the difference between this symbol and the next one as
1007 Symbol &symbol = m_symbols[entry->data];
1008 symbol.SetByteSize(sym_size);
1009 symbol.SetSizeIsSynthesized(true);
1037 Symbol *symbol = SymbolAtIndex(entry->data);
1038 if (symbol->GetFileAddress() == file_addr)
1039 return symbol;
1053 Symbol *symbol = SymbolAtIndex(entry->data);
1054 if (symbol->ContainsFileAddress(file_addr))
1055 return symbol;
1075 Symbol *symbol = SymbolAtIndex(all_addr_indexes[i]);
1076 if (symbol->ContainsFileAddress(file_addr)) {
1077 if (!callback(symbol))
1094 sc.symbol = SymbolAtIndex(symbol_indexes[i]);
1095 if (sc.symbol)
1118 sym_ctx.symbol = SymbolAtIndex(temp_symbol_indexes[i]);
1119 if (sym_ctx.symbol) {
1120 switch (sym_ctx.symbol->GetType()) {
1165 const Symbol *symbol = SymbolAtIndex(idx);
1166 const uint32_t sibling_idx = symbol->GetSiblingIndex();
1168 return symbol;
1179 // another object file in a separate symbol file.
1192 // Encode will return false if the symbol table's object file doesn't have
1246 /// The encoding format for the symbol table is as follows:
1266 // Encoder the symbol table into a separate encoder first. This allows us
1268 // write the string table out before the symbol table.
1276 // Encode the symbol data for all symbols.
1277 for (const auto &symbol: m_symbols)
1278 symbol.Encode(symtab_encoder, strtab);
1298 // Followed by the symbol table data.
1320 // And now we can decode the symbol table with string table we just decoded.