Beispiel #1
0
        public void Setup()
        {
            this.sc = new ServiceContainer();
            sc.AddService <IFileSystemService>(new FileSystemServiceImpl());
            this.arch     = new X86ArchitectureReal("x86-real-16");
            this.platform = new MsdosPlatform(sc, arch);

            ArgumentSerializer argSer = new ArgumentSerializer(arch);

            svc = new SerializedService
            {
                Name        = "msdos_ioctl_get_device_info",
                SyscallInfo = new SyscallInfo_v1
                {
                    Vector         = "21",
                    RegisterValues = new[] {
                        new SerializedRegValue("ah", "44"),
                        new SerializedRegValue("al", "00"),
                    }
                },
                Signature = new SerializedSignature
                {
                    ReturnValue = argSer.Serialize(
                        new Identifier("C", PrimitiveType.Bool,
                                       new FlagGroupStorage(Registers.eflags, (uint)FlagM.CF, "C", PrimitiveType.Byte)))
                }
            };
        }
Beispiel #2
0
        public void Setup()
        {
            svc                               = new SerializedService();
            svc.Name                          = "msdos_ioctl_get_device_info";
            svc.SyscallInfo                   = new SerializedSyscallInfo();
            svc.SyscallInfo.Vector            = "21";
            svc.SyscallInfo.RegisterValues    = new SerializedRegValue[2];
            svc.SyscallInfo.RegisterValues[0] = new SerializedRegValue("ah", "44");
            svc.SyscallInfo.RegisterValues[1] = new SerializedRegValue("al", "00");
            svc.Signature                     = new SerializedSignature();
            ArgumentSerializer argSer = new ArgumentSerializer(null, arch, null, null);

            svc.Signature.ReturnValue = argSer.Serialize(new Identifier("C", PrimitiveType.Bool,
                                                                        new FlagGroupStorage((uint)FlagM.CF, "C", PrimitiveType.Byte)));
        }
 public void ArgSer_SerializeNullArgument()
 {
     Assert.IsNull(argser.Serialize(null));
 }