Package jnr.ffi.mapper

Examples of jnr.ffi.mapper.DefaultTypeMapper


    static UDis86 loadUDis86() {
        List<String> libraryPaths = Arrays.asList("/usr/local/lib", "/opt/local/lib", "/usr/lib");
        String path = Platform.getNativePlatform().locateLibrary("udis86", libraryPaths);
        NativeLibrary library = new NativeLibrary(path != null ? path : "udis86");
        Map<LibraryOption, Object> options = new HashMap<LibraryOption, Object>();
        DefaultTypeMapper typeMapper = new DefaultTypeMapper();
        typeMapper.put(X86Disassembler.class, new X86DisassemblerConverter());
        options.put(LibraryOption.TypeMapper, typeMapper);

        return new AsmLibraryLoader().loadLibrary(library, UDis86.class, options);
    }
View Full Code Here


        static final long intel = ((AbstractAsmLibraryInterface) INSTANCE).getLibrary().findSymbolAddress("ud_translate_intel");
        static final long att = ((AbstractAsmLibraryInterface) INSTANCE).getLibrary().findSymbolAddress("ud_translate_att");
    }

    static UDis86 loadUDis86() {
        DefaultTypeMapper typeMapper = new DefaultTypeMapper();
        typeMapper.put(X86Disassembler.class, new X86DisassemblerConverter());
        return LibraryLoader.create(UDis86.class)
                .library("udis86")
                .search("/usr/local/lib")
                .search("/opt/local/lib")
                .search("/usr/lib")
View Full Code Here

TOP

Related Classes of jnr.ffi.mapper.DefaultTypeMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.