Esempio n. 1
0
        private bool ProcedureTerminates(ProcedureBase proc)
        {
            if (proc.Characteristics != null && proc.Characteristics.Terminates)
                return true;
            var callee = proc as Procedure;
            if (callee == null)
                return false;

            return (callee != null && flow[callee].TerminatesProcess);
        }
        public void Setup()
        {
            exit = new ExternalProcedure("exit", 
                new ProcedureSignature(null, new Identifier("retCode", PrimitiveType.Int32, new StackArgumentStorage(0, PrimitiveType.Int32))));
            exit.Characteristics = new ProcedureCharacteristics();
            exit.Characteristics.Terminates = true;

            progMock = new ProgramBuilder();
            flow = new ProgramDataFlow();
        }
Esempio n. 3
0
 public ProcedureTextSpan(ProcedureBase proc, Address addr)
 {
     this.proc = proc;
     this.Tag = addr;
     this.Style = "dasm-addrText";
 }
		public void VisitProcedure(ProcedureBase proc)
		{
			if (proc.Signature != null)
			{
				if (proc.Signature.TypeVariable == null)
				{
					proc.Signature.TypeVariable = store.EnsureExpressionTypeVariable(
						factory,
                        new Identifier("signature of " + proc.Name, VoidType.Instance, null),
						null);
				}
				if (proc.Signature.Parameters != null)
				{
					foreach (Identifier id in proc.Signature.Parameters)
					{
						id.Accept(this);
					}
				}
				//$REVIEW: return type?
			}
		}
Esempio n. 5
0
 public Statement Call(ProcedureBase callee, int retSizeOnStack)
 {
     ProcedureConstant c = new ProcedureConstant(PrimitiveType.Pointer32, callee);
     CallInstruction ci = new CallInstruction(c, new CallSite(retSizeOnStack, 0));  
     return Emit(ci);
 }
Esempio n. 6
0
 public virtual FunctionType GetProcedureSignature(ProcedureBase proc)
 {
     return(proc.Signature);
 }
Esempio n. 7
0
 public virtual ProcedureSignature GetProcedureSignature(ProcedureBase proc)
 {
     return(proc.Signature);
 }
Esempio n. 8
0
		public virtual FunctionType GetProcedureSignature(ProcedureBase proc)
		{
			return proc.Signature;
		}
Esempio n. 9
0
		public virtual ProcedureSignature GetProcedureSignature(ProcedureBase proc)
		{
			return proc.Signature;
		}