Ejemplo n.º 1
0
 private void btnLoad_Click(object sender, EventArgs e)
 {
     var image = new LoadedImage(Address.Ptr32(0x12312300),new byte[0x1000]);
     var imageMap = image.CreateImageMap();
     var arch = new Reko.Arch.X86.X86ArchitectureFlat32();
     var program = new Core.Program(image, imageMap, arch, new DefaultPlatform(null, arch));
     var project = new Project { Programs = { program } };
     pbs.Load(project);
 }
        public void GlobalSetup()
        {
            using (var programStream = new MemoryStream(Encoding.ASCII.GetBytes(Programs.Square10000)))
            {
                program = Compiler.Compile(programStream);
            }

            inputStream  = new MemoryStream();
            outputStream = new MemoryStream();
        }
Ejemplo n.º 3
0
 private void btnLoad_Click(object sender, EventArgs e)
 {
     var mem = new MemoryArea(Address.Ptr32(0x12312300),new byte[0x1000]);
     var imageMap = new SegmentMap(
             mem.BaseAddress,
             new ImageSegment("code", mem, AccessMode.ReadWriteExecute));
     var arch = new X86ArchitectureFlat32();
     var program = new Core.Program(imageMap, arch, new DefaultPlatform(null, arch));
     var project = new Project { Programs = { program } };
     pbs.Load(project);
 }
Ejemplo n.º 4
0
        private void btnLoad_Click(object sender, EventArgs e)
        {
            var image    = new LoadedImage(Address.Ptr32(0x12312300), new byte[0x1000]);
            var imageMap = image.CreateImageMap();
            var arch     = new X86ArchitectureFlat32();
            var program  = new Core.Program(image, imageMap, arch, new DefaultPlatform(null, arch));
            var project  = new Project {
                Programs = { program }
            };

            pbs.Load(project);
        }
Ejemplo n.º 5
0
        private void btnLoad_Click(object sender, EventArgs e)
        {
            var mem      = new MemoryArea(Address.Ptr32(0x12312300), new byte[0x1000]);
            var imageMap = new SegmentMap(
                mem.BaseAddress,
                new ImageSegment("code", mem, AccessMode.ReadWriteExecute));
            var arch    = new X86ArchitectureFlat32();
            var program = new Core.Program(imageMap, arch, new DefaultPlatform(null, arch));
            var project = new Project {
                Programs = { program }
            };

            pbs.Load(project);
        }
Ejemplo n.º 6
0
        private void btnLoad_Click(object sender, EventArgs e)
        {
            var mem      = new ByteMemoryArea(Address.Ptr32(0x12312300), new byte[0x1000]);
            var imageMap = new SegmentMap(
                mem.BaseAddress,
                new ImageSegment("code", mem, AccessMode.ReadWriteExecute));
            var sc      = new ServiceContainer();
            var arch    = new X86ArchitectureFlat32(sc, "x86-protected-32", new Dictionary <string, object>());
            var program = new Core.Program(imageMap, arch, new DefaultPlatform(sc, arch));
            var project = new Project {
                Programs = { program }
            };

            pbs.Load(project);
        }
Ejemplo n.º 7
0
        public void GlobalSetup()
        {
            using (var programStream = new MemoryStream(Encoding.ASCII.GetBytes(Programs.Rot13)))
            {
                program = Compiler.Compile(programStream);
            }

            var baseString = Encoding.ASCII.GetBytes("Brainfuck is awesome!");
            var input      = new byte[N];

            for (var i = 0; i < N - 1; i++)
            {
                input[i] = baseString[i % baseString.Length];
            }
            inputStream  = new MemoryStream(input);
            outputStream = new MemoryStream(N);
        }
Ejemplo n.º 8
0
 public ICodeLocation CreateStatementNavigator(Core.Program program, Statement stm)
 {
     return(new JsLocation(@$ "{{" "program" ":" "{program.Name}" "," "stmLoc" ":" "{stm.LinearAddress}" "}}"));
 }
Ejemplo n.º 9
0
 public ICodeLocation CreateProcedureNavigator(Core.Program program, Procedure proc)
 {
     return(new JsLocation(@$ "{{" "program" ":" "{program.Name}" "," "procAddr" ":" "{proc.EntryAddress}" "}}"));
 }
Ejemplo n.º 10
0
 public ICodeLocation CreateJumpTableNavigator(Core.Program program, IProcessorArchitecture arch, Address addrIndirectJump, Address?addrVector, int stride)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 11
0
 public ICodeLocation CreateBlockNavigator(Core.Program program, Block block)
 {
     return(new JsLocation(@$ "{{" "program" ":" "{program.Name}" "," "blockAddr" ":" "{block.Address}" "}}"));
 }
Ejemplo n.º 12
0
 public ICodeLocation CreateAddressNavigator(Core.Program program, Address address)
 {
     return(new JsLocation(@$ "{{" "program" ":" "{program.Name}" "," "addr" ":" "{address}" "}}"));
 }