Пример #1
0
        private Pdb LoadPdb()
        {
            // We should never be required to load a PDB for a managed assembly that does
            // not incorporate native code, as no managed-relevant rule currently crawls
            // PDBs for its analysis.
            Debug.Assert(!PE.IsManaged || PE.IsMixedMode);

            Pdb pdb = null;

            try
            {
                pdb = new Pdb(PE.FileName, _symbolPath, _localSymbolDirectories);
            }
            catch (PdbParseException ex)
            {
                PdbParseException = ex;
            }

            if (pdb != null && pdb.IsStripped)
            {
                StrippedPdb       = pdb;
                pdb               = null;
                PdbParseException = new PdbParseException(BinaryParsersResources.PdbStripped);
            }
            return(pdb);
        }
Пример #2
0
        public PEBinary(Uri uri) : base(uri)
        {
            PE = new PE(TargetUri.LocalPath);
            IsManagedAssembly = PE.IsManaged;
            LoadException     = PE.LoadException;
            Valid             = PE.IsPEFile;

            try
            {
                Pdb = new Pdb(PE.FileName, Pdb.SymbolPath);
            }
            catch (PdbParseException ex)
            {
                PdbParseException = ex;
            }

            if (Pdb != null && Pdb.IsStripped)
            {
                StrippedPdb       = Pdb;
                Pdb               = null;
                PdbParseException = new PdbParseException(BinaryParsersResources.PdbStripped);
            }
        }