Lines Matching +defs:symbol +defs:function

101 llvm::Expected<Symbol> Symbol::FromJSON(const JSONSymbol &symbol,
106 if (!symbol.value && !symbol.address)
108 "symbol must contain either a value or an address");
110 if (symbol.value && symbol.address)
112 "symbol cannot contain both a value and an address");
114 const uint64_t size = symbol.size.value_or(0);
119 const bool size_is_valid = symbol.size.has_value();
123 if (symbol.address) {
125 section_list->FindSectionContainingFileAddress(*symbol.address)) {
126 const uint64_t offset = *symbol.address - section_sp->GetFileAddress();
127 return Symbol(symbol.id.value_or(0), Mangled(symbol.name),
128 symbol.type.value_or(eSymbolTypeAny), external, is_debug,
134 llvm::formatv("no section found for address: {0:x}", *symbol.address));
139 return Symbol(symbol.id.value_or(0), Mangled(symbol.name),
140 symbol.type.value_or(eSymbolTypeAny), external, is_debug,
142 AddressRange(SectionSP(), *symbol.value, size), size_is_valid,
272 // Make sure the size of the symbol is up to date before dumping
319 Function *function = base_address.CalculateSymbolContextFunction();
320 if (function) {
322 // prologue information. So if this symbol points to a function, use
324 m_type_data = function->GetPrologueByteSize();
366 // Sanity check - this may be a function in the middle of code that
367 // has debug information, but not for this symbol. So the line
368 // entries surrounding us won't lie inside our function. In that
375 // size of a function prologue.
437 // Symbols can reconstruct the symbol and the module in the symbol context
438 sc->symbol = this;
496 if (sc.symbol->IsExternal())
497 return sc.symbol;
499 // If we didn't find the symbol in this module, it may be because this
574 // can't resolve indirect symbols without calling a function...
631 // Synthetic symbol names don't mean anything, but they do uniquely
633 // starts with the synthetic symbol prefix, followed by a unique number.
634 // Typically the UserID of a real symbol is the symbol table index of the
635 // symbol in the object file's symbol table(s), so it will be the same
684 /// The encoding format for the symbol is as follows:
697 /// do the same thing when decoding the symbol. There are test that ensure this
726 // A symbol's value might be an address, or it might be a constant. If the
727 // symbol's base address doesn't have a section, then it is a constant value.
778 bool fromJSON(const llvm::json::Value &value, lldb_private::JSONSymbol &symbol,
781 const bool mapped = o && o.map("value", symbol.value) &&
782 o.map("address", symbol.address) &&
783 o.map("size", symbol.size) && o.map("id", symbol.id) &&
784 o.map("type", symbol.type) && o.map("name", symbol.name);
789 if (!symbol.value && !symbol.address) {
790 path.report("symbol must have either a value or an address");
794 if (symbol.value && symbol.address) {
795 path.report("symbol cannot have both a value and an address");
837 path.report("invalid symbol type");