Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | symbols.try_emplace( | ||||
/*is_trampoline*/ false, /*is_artificial*/ false, | /*is_trampoline*/ false, /*is_artificial*/ false, | ||||
AddressRange(section_sp, address - section_sp->GetFileAddress(), | AddressRange(section_sp, address - section_sp->GetFileAddress(), | ||||
size.getValueOr(0)), | size.getValueOr(0)), | ||||
size.hasValue(), /*contains_linker_annotations*/ false, /*flags*/ 0); | size.hasValue(), /*contains_linker_annotations*/ false, /*flags*/ 0); | ||||
}; | }; | ||||
for (llvm::StringRef line : lines(*m_obj_file, Record::Func)) { | for (llvm::StringRef line : lines(*m_obj_file, Record::Func)) { | ||||
if (auto record = FuncRecord::parse(line)) | if (auto record = FuncRecord::parse(line)) | ||||
add_symbol(record->getAddress(), record->getSize(), record->getName()); | add_symbol(record->Address, record->Size, record->Name); | ||||
} | } | ||||
for (llvm::StringRef line : lines(*m_obj_file, Record::Public)) { | for (llvm::StringRef line : lines(*m_obj_file, Record::Public)) { | ||||
if (auto record = PublicRecord::parse(line)) | if (auto record = PublicRecord::parse(line)) | ||||
add_symbol(record->getAddress(), llvm::None, record->getName()); | add_symbol(record->Address, llvm::None, record->Name); | ||||
else | else | ||||
LLDB_LOG(log, "Failed to parse: {0}. Skipping record.", line); | LLDB_LOG(log, "Failed to parse: {0}. Skipping record.", line); | ||||
} | } | ||||
for (auto &KV : symbols) | for (auto &KV : symbols) | ||||
symtab.AddSymbol(std::move(KV.second)); | symtab.AddSymbol(std::move(KV.second)); | ||||
symtab.CalculateSymbolSizes(); | symtab.CalculateSymbolSizes(); | ||||
} | } |