public void SafeReadSymbols(AssemblyDefinition assembly) { if (!_linkSymbols) { return; } if (assembly.MainModule.HasSymbols) { return; } try { if (_symbolReaderProvider != null) { var symbolReader = _symbolReaderProvider.GetSymbolReader( assembly.MainModule, assembly.MainModule.FileName); _annotations.AddSymbolReader(assembly, symbolReader); assembly.MainModule.ReadSymbols(symbolReader); } else { assembly.MainModule.ReadSymbols(); } } catch {} }
public virtual void SafeReadSymbols(AssemblyDefinition assembly) { if (assembly.MainModule.HasSymbols) { return; } if (_symbolReaderProvider == null) { throw new ArgumentNullException(nameof(_symbolReaderProvider)); } try { var symbolReader = _symbolReaderProvider.GetSymbolReader( assembly.MainModule, assembly.MainModule.FileName); if (symbolReader == null) { return; } _annotations.AddSymbolReader(assembly, symbolReader); assembly.MainModule.ReadSymbols(symbolReader); } catch { } }
public virtual void SafeReadSymbols(AssemblyDefinition assembly) { if (assembly.MainModule.HasSymbols) { return; } if (_symbolReaderProvider == null) { throw new ArgumentNullException(nameof(_symbolReaderProvider)); } try { var symbolReader = _symbolReaderProvider.GetSymbolReader( assembly.MainModule, assembly.MainModule.FileName); if (symbolReader == null) { return; } try { assembly.MainModule.ReadSymbols(symbolReader); } catch { symbolReader.Dispose(); return; } // Add symbol reader to annotations only if we have successfully read it _annotations.AddSymbolReader(assembly, symbolReader); } catch { } }
public virtual void SafeReadSymbols(AssemblyDefinition assembly) { if (assembly.MainModule.HasSymbols) { return; } if (_symbolReaderProvider == null) { throw new InvalidOperationException("Symbol provider is not set"); } try { var symbolReader = _symbolReaderProvider.GetSymbolReader( assembly.MainModule, GetAssemblyLocation(assembly)); if (symbolReader == null) { return; } try { assembly.MainModule.ReadSymbols(symbolReader); } catch { symbolReader.Dispose(); return; } // Add symbol reader to annotations only if we have successfully read it _annotations.AddSymbolReader(assembly, symbolReader); } catch { } }