private static SparcInstruction Disassemble(LoadedImage img)
        {
            var arch = new SparcArchitecture(PrimitiveType.Word32);
            var dasm = new SparcDisassembler(arch, img.CreateBeReader(0U));

            return(dasm.First());
        }
Exemple #2
0
        private IEnumerator <M68kInstruction> CreateDasm(byte[] bytes, uint address)
        {
            Address     addr = Address.Ptr32(address);
            LoadedImage img  = new LoadedImage(addr, bytes);

            return(M68kDisassembler.Create68020(img.CreateBeReader(addr)).GetEnumerator());
        }
Exemple #3
0
        protected override LoadedImage RewriteCode(uint[] words)
        {
            byte[] bytes = words.SelectMany(w => new byte[]
            {
                (byte)(w >> 24),
                (byte)(w >> 16),
                (byte)(w >> 8),
                (byte)w
            }).ToArray();
            var image = new LoadedImage(LoadAddress, bytes);

            ppcInstrs = new PowerPcDisassembler(arch, image.CreateBeReader(LoadAddress), PrimitiveType.Word32);
            return(image);
        }
Exemple #4
0
        protected override LoadedImage RewriteCode(uint[] words)
        {
            byte[] bytes = words.SelectMany(w => new byte[]
            {
                (byte)(w >> 24),
                (byte)(w >> 16),
                (byte)(w >> 8),
                (byte)w
            }).ToArray();
            var image = new LoadedImage(LoadAddress, bytes);

            dasm = new MipsDisassembler(arch, image.CreateBeReader(LoadAddress));
            return(image);
        }