Example #1
0
File: Pe.cpp Project: 0bliv10n/s2e
PeReader::PeReader(BFDInterface *bfd):Binary(bfd)
{
    m_file = getBfd()->getFile();
    assert(isValid(m_file));
    initialize();
    resolveImports();
}
Example #2
0
void Loader::onTypeSpec( const location& kLoc, TypeKind kind, const location& nLoc, const std::string& name )
{
	if( _typeBuilder.isValid() )
		pushError( kLoc, "only one type specification is allowed per file" );
	else if( name != _cslFileBaseName )
		pushError( nLoc, "the name of the defined type must match its filename" );
	else
	{
		_typeBuilder = createTypeBuilder( name, kind );
		onElement( std::string() );
		resolveImports();
	}
}