本文整理汇总了C#中Reko.Core.ProcessorState类的典型用法代码示例。如果您正苦于以下问题:C# ProcessorState类的具体用法?C# ProcessorState怎么用?C# ProcessorState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProcessorState类属于Reko.Core命名空间,在下文中一共展示了ProcessorState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StartupFinder
public StartupFinder(IServiceProvider services, Program program, Address addrStart)
{
this.services = services;
this.prog= program;
this.start = addrStart;
this.state = program.Architecture.CreateProcessorState();
}
示例2: BuildAux
public List<Address> BuildAux(Backwalker bw, Address addrFrom, ProcessorState state)
{
int limit = 0;
int[] permutation = null;
foreach (BackwalkOperation op in bw.Operations)
{
BackwalkError err = op as BackwalkError;
if (err != null)
{
return PostError(err.ErrorMessage, addrFrom, bw.VectorAddress);
}
var deref = op as BackwalkDereference;
if (deref != null)
{
permutation = BuildMapping(deref, limit);
}
limit = op.Apply(limit);
}
if (limit == 0)
return PostError("Unable to determine limit", addrFrom, bw.VectorAddress);
return BuildTable(
bw.VectorAddress,
limit,
permutation,
(bw.Stride == 1 || bw.Stride == 0) && bw.JumpSize > 1
? bw.JumpSize
: bw.Stride,
state);
}
示例3: CreateWorkItem
private BlockWorkitem CreateWorkItem(Address addr, ProcessorState state)
{
return new BlockWorkitem(
scanner,
program,
state,
addr);
}
示例4: FindService
public override SystemService FindService(int vector, ProcessorState state)
{
if (TypeLibs.Length == 0)
return null;
SystemService svc;
this.TypeLibs[0].ServicesByVector.TryGetValue(vector&0xFFFF , out svc);
return svc;
}
示例5: CreateRewriter
public override IEnumerable<RtlInstructionCluster> CreateRewriter(ImageReader rdr, ProcessorState state, Frame frame, IRewriterHost host)
{
return new MipsRewriter(
this,
new MipsDisassembler(this, rdr, IsVersion6OrLater),
frame,
host);
}
示例6: CreateRewriter
public IEnumerable<RtlInstructionCluster> CreateRewriter(ImageReader rdr, ProcessorState state, Frame frame, IRewriterHost host)
{
var linAddr = rdr.Address.ToLinear();
RtlTrace trace;
if (!rewriters.Traces.TryGetValue(rdr.Address, out trace))
NUnit.Framework.Assert.Fail(string.Format("Unexpected request for a rewriter at address {0}", rdr.Address));
return trace;
}
示例7: FindService
public override SystemService FindService(int vector, ProcessorState state)
{
foreach (SystemService svc in realModeServices)
{
if (svc.SyscallInfo.Matches(vector, state))
return svc;
}
return null;
}
示例8: Build
public List<Address> Build(Address addrTable, Address addrFrom, ProcessorState state)
{
bw = new Backwalker(this, null, null);
if (bw == null)
return null;
List<BackwalkOperation> operations = bw.BackWalk(null);
if (operations == null)
return PostError("Unable to determine limit", addrFrom, addrTable);
return BuildAux(bw, addrFrom, state);
}
示例9: FindService
public override SystemService FindService(int vector, ProcessorState state)
{
EnsureTypeLibraries();
return this.typelibs
.Where(t => t.ServicesByVector != null && t.ServicesByVector.Count > 0)
.SelectMany(t => t.ServicesByVector)
.Where(svc => svc.Value.SyscallInfo.Matches(vector, state))
.Select(svc => svc.Value)
.FirstOrDefault();
}
示例10: EntryPoint
public EntryPoint(Address addr, string name, ProcessorState state)
{
if (addr == null)
throw new ArgumentNullException("addr");
if (state == null)
throw new ArgumentNullException("state");
this.Address = addr;
this.Name = name;
this.ProcessorState = state;
}
示例11: FindService
public override SystemService FindService(int vector, ProcessorState state)
{
EnsureTypeLibraries(PlatformIdentifier);
foreach (SystemService svc in realModeServices)
{
if (svc.SyscallInfo.Matches(vector, state))
return svc;
}
return null;
}
示例12: Setup
public void Setup()
{
arch = new IntelArchitecture(ProcessorMode.Protected32);
m = new ProcedureBuilder();
state = arch.CreateProcessorState();
expSimp = new ExpressionSimplifier(
new IntelArchitecture(ProcessorMode.Protected32).CreateProcessorState());
SCZO = m.Frame.EnsureFlagGroup((uint)(FlagM.SF | FlagM.CF | FlagM.ZF | FlagM.OF), "SCZO", PrimitiveType.Byte);
host = new BackwalkerHost();
}
示例13: FindService
public override SystemService FindService(int vector, ProcessorState state)
{
base.EnsureTypeLibraries(base.PlatformIdentifier);
foreach (var module in this.Metadata.Modules.Values)
{
SystemService svc;
if (module.ServicesByVector.TryGetValue(vector & 0xFFFF, out svc))
return svc;
}
return null;
}
示例14: Matches
private bool Matches(ProcessorState state)
{
for (int i = 0; i < RegisterValues.Length; ++i)
{
Constant v = state.GetRegister(RegisterValues[i].Register);
if (v == null || v == Constant.Invalid)
return false;
if (v.ToUInt32() != RegisterValues[i].Value)
return false;
}
return true;
}
示例15: ReadSegmentedCodeAddress
protected Address ReadSegmentedCodeAddress(int byteSize, ImageReader rdr, ProcessorState state)
{
if (byteSize == PrimitiveType.Word16.Size)
{
return Address.SegPtr(state.GetRegister(Registers.cs).ToUInt16(), rdr.ReadLeUInt16());
}
else
{
ushort off = rdr.ReadLeUInt16();
ushort seg = rdr.ReadLeUInt16();
return Address.SegPtr(seg, off);
}
}