Example #1
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;
 }
 private static SparcInstruction Disassemble(LoadedImage img)
 {
     var arch = new SparcArchitecture(PrimitiveType.Word32);
     var dasm = new SparcDisassembler(arch, img.CreateBeReader(0U));
     return dasm.First();
 }