public SetValue ( RegisterStorage reg, Expression value ) : Constant | ||
reg | RegisterStorage | |
value | Expression | |
Результат | Constant |
public void SetAssumedRegisterValues(Address addr, ProcessorState st) { Procedure_v1 userProc; if (!program.UserProcedures.TryGetValue(addr, out userProc) || userProc.Assume == null) return; foreach (var rv in userProc.Assume) { var reg = program.Architecture.GetRegister(rv.Register); var val = rv.Value == "*" ? Constant.Invalid : Constant.Create(reg.DataType, Convert.ToUInt64(rv.Value, 16)); st.SetValue(reg, val); } }
/// <summary> /// Before processing the body of a procedure, perform housekeeping tasks. /// </summary> /// <param name="addr"></param> /// <param name="state"></param> /// <param name="proc"></param> /// <returns></returns> private void EstablishInitialState(Address addr, ProcessorState st, Procedure proc) { st.SetInstructionPointer(addr); st.OnProcedureEntered(); var sp = proc.Frame.EnsureRegister(program.Architecture.StackRegister); st.SetValue(sp, proc.Frame.FramePointer); SetAssumedRegisterValues(addr, st); }