diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-02 18:31:19 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-02 18:31:19 +0000 | 
| commit | 773dd0e6e632d48d7123a321ba86f50847b9afc0 (patch) | |
| tree | c6bd992bb1963df11f8de346d12a5a70c2e4deb2 /source/Core/Module.cpp | |
| parent | 5060b64b7d79491d507a75201be161fd0c38fcbb (diff) | |
Notes
Diffstat (limited to 'source/Core/Module.cpp')
| -rw-r--r-- | source/Core/Module.cpp | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp index ddc9fca806715..d168474c3479b 100644 --- a/source/Core/Module.cpp +++ b/source/Core/Module.cpp @@ -1432,6 +1432,22 @@ size_t Module::FindSymbolsMatchingRegExAndType(const RegularExpression ®ex,    return sc_list.GetSize() - initial_size;  } +void Module::PreloadSymbols() { +  std::lock_guard<std::recursive_mutex> guard(m_mutex); +  SymbolVendor * sym_vendor = GetSymbolVendor(); +  if (!sym_vendor) { +    return; +  } +  // Prime the symbol file first, since it adds symbols to the symbol table. +  if (SymbolFile *symbol_file = sym_vendor->GetSymbolFile()) { +    symbol_file->PreloadSymbols(); +  } +  // Now we can prime the symbol table. +  if (Symtab * symtab = sym_vendor->GetSymtab()) { +    symtab->PreloadSymbols(); +  } +} +  void Module::SetSymbolFileFileSpec(const FileSpec &file) {    if (!file.Exists())      return; | 
