ScanProcedure() public method

Performs a scan of the blocks that constitute a procedure named procedureName
public ScanProcedure ( Address addr, string procedureName, ProcessorState state ) : ProcedureBase
addr Address Address of the code from which we will start scanning.
procedureName string
state ProcessorState
return ProcedureBase
コード例 #1
0
ファイル: ScannerTests.cs プロジェクト: relaxar/reko
        public void Scanner_UserProcedure_GenerateSignature()
        {
            Given_Program(Address.Ptr32(0x00100000), new byte[100]);
            Given_Project();
            program.User.Procedures.Add(
                Address.Ptr32(0x00100010),
                new Procedure_v1
                {
                    CSignature = "int foo(char * a, float b)"
                });
            mr.ReplayAll();

            var scanner = new Scanner(
                this.program,
                new ImportResolver(project, program, eventListener),
                this.sc);
            var proc = scanner.ScanProcedure(
                Address.Ptr32(0x00100010),
                null,
                fakeArch.CreateProcessorState());

            Assert.AreEqual("foo", proc.Name);
            Assert.AreEqual("Register int32 foo(Stack (ptr char) a, Stack real32 b)", proc.Signature.ToString(proc.Name));
        }