예제 #1
0
 // Once you have a file path to a PDB file, you can open it with this method
 /// <summary>
 /// Given the path name to a particular PDB file, load it so that you can resolve symbols in it.  
 /// </summary>
 /// <param name="symbolFilePath">The name of the PDB file to open.</param>
 /// <returns>The SymbolReaderModule that represents the information in the symbol file (PDB)</returns>
 internal SymbolModule OpenSymbolFile(string symbolFilePath)
 {
     var ret = new SymbolModule(this, symbolFilePath);
     return ret;
 }
예제 #2
0
파일: modules.cs 프로젝트: mwatts/clrmd
 public override void LoadPdb(string path)
 {
     _symbols = _runtime.DataTarget.SymbolLocator.LoadPdb(path);
 }
예제 #3
0
        unsafe internal SourceFile(SymbolModule module, IDiaSourceFile sourceFile)
        {
            _symbolModule = module;
            BuildTimeFilePath = sourceFile.fileName;

            // 0 No checksum present.
            // 1 CALG_MD5 checksum generated with the MD5 hashing algorithm.
            // 2 CALG_SHA1 checksum generated with the SHA1 hashing algorithm.
            _hashType = sourceFile.checksumType;
            if (_hashType != 1 && _hashType != 0)
            {
                // TODO does anyone use SHA1?   
                Debug.Assert(false, "Unknown hash type");
                _hashType = 0;
            }
            if (_hashType != 0)
            {
                // MD5 is 16 bytes
                // SHA1 is 20 bytes  
                _hash = new byte[16];

                uint bytesFetched;
                fixed (byte* bufferPtr = _hash)
                    sourceFile.get_checksum((uint)_hash.Length, out bytesFetched, out *bufferPtr);
                Debug.Assert(bytesFetched == 16);
            }
        }
예제 #4
0
 public override void LoadPdb(string path)
 {
     m_symbols = new SymbolModule(m_runtime.DataTarget.SymbolReader, path);
 }
예제 #5
0
        SymbolModule FindPdbForModule(ModuleInfo module)
        {
            if (module == null)
                return null;

            string pdbName;
            Guid pdbGuid;
            int rev;
            using (PEFile pefile = new PEFile(new ReadVirtualStream(m_dataReader, (long)module.ImageBase, (long)module.FileSize), true))
                if (!pefile.GetPdbSignature(out pdbName, out pdbGuid, out rev))
                    return null;

            if (!File.Exists(pdbName))
            {
                ISymbolNotification notification = DefaultSymbolNotification ?? new NullSymbolNotification();
                pdbName = Path.GetFileName(pdbName);
                pdbName = SymbolReader.FindSymbolFilePath(pdbName, pdbGuid, rev, notification);

                if (string.IsNullOrEmpty(pdbName) || !File.Exists(pdbName))
                    return null;
            }

            if (pdbName == null)
            {
                m_symbols[module] = null;
                return null;
            }

            SymbolModule symbols = null;
            try
            {
                symbols = new SymbolModule(SymbolReader, pdbName);
                m_symbols[module] = symbols;
            }
            catch
            {
                m_symbols[module] = null;
                return null;
            }

            return symbols;
        }
예제 #6
0
파일: modules.cs 프로젝트: tomasr/clrmd
 public override void LoadPdb(string path)
 {
     _symbols = _runtime.DataTarget.FileLoader.LoadPdb(path);
 }
예제 #7
0
 // Once you have a file path to a PDB file, you can open it with this method
 /// <summary>
 /// Given the path name to a particular PDB file, load it so that you can resolve symbols in it.  
 /// </summary>
 /// <param name="symbolFilePath">The name of the PDB file to open.</param>
 /// <returns>The SymbolReaderModule that represents the information in the symbol file (PDB)</returns>
 internal SymbolModule OpenSymbolFile(string symbolFilePath)
 {
     Debug.Assert(!IsDisposed);
     var ret = new SymbolModule(this, symbolFilePath);
     return ret;
 }