/// <summary> /// Inject statements into the entry block that establish the frame, /// and if the procedure has been given a valid signature already, /// copy the input arguments into their local counterparts. /// </summary> /// <param name="addr"></param> /// <param name="proc"></param> public void InjectProcedureEntryInstructions(Address addr, Procedure proc) { var bb = new StatementInjector(proc, proc.EntryBlock, addr); var sp = proc.Frame.EnsureRegister(proc.Architecture.StackRegister); bb.Assign(sp, proc.Frame.FramePointer); Program.Platform.InjectProcedureEntryStatements(proc, addr, bb); }
/// <summary> /// Inject statements into the starting block that establish the frame, /// and if the procedure has been given a valid signature already, /// copy the input arguments into their local counterparts. /// </summary> /// <param name="addr"></param> /// <param name="proc"></param> /// <param name="sp"></param> public void InjectProcedureEntryInstructions(Address addr, Procedure proc) { var bb = new StatementInjector(proc, proc.EntryBlock.Succ[0], addr); var sp = proc.Frame.EnsureRegister(program.Architecture.StackRegister); bb.Assign(sp, proc.Frame.FramePointer); program.Platform.InjectProcedureEntryStatements(proc, addr, bb); }