Example #1
0
        public static void Rewrite(
            Program program,
            ProgramDataFlow summaries,
            DecompilerEventListener eventListener)
        {
            GlobalCallRewriter crw = new GlobalCallRewriter(program, summaries, eventListener);

            foreach (Procedure proc in program.Procedures.Values)
            {
                if (eventListener.IsCanceled())
                {
                    return;
                }
                ProcedureFlow flow = crw.mpprocflow[proc];
                flow.Dump(program.Architecture);
                crw.AdjustLiveOut(flow);
                crw.EnsureSignature(proc, flow);
                crw.AddUseInstructionsForOutArguments(proc);
            }

            foreach (Procedure proc in program.Procedures.Values)
            {
                if (eventListener.IsCanceled())
                {
                    return;
                }
                crw.RewriteCalls(proc);
                crw.RewriteReturns(proc);
            }
        }
Example #2
0
        public static void Rewrite(Program program, ProgramDataFlow summaries)
        {
            GlobalCallRewriter crw = new GlobalCallRewriter(program, summaries);
            foreach (Procedure proc in program.Procedures.Values)
            {
                ProcedureFlow flow = (ProcedureFlow) crw.mpprocflow[proc];
                flow.Dump(program.Architecture);
                crw.AdjustLiveOut(flow);
                crw.EnsureSignature(proc, flow);
                crw.AddUseInstructionsForOutArguments(proc);
            }

            foreach (Procedure proc in program.Procedures.Values)
            {
                crw.RewriteCalls(proc);
                crw.RewriteReturns(proc);
            }
        }
Example #3
0
        public static void Rewrite(Program program, ProgramDataFlow summaries)
        {
            GlobalCallRewriter crw = new GlobalCallRewriter(program, summaries);

            foreach (Procedure proc in program.Procedures.Values)
            {
                ProcedureFlow flow = (ProcedureFlow)crw.mpprocflow[proc];
                flow.Dump(program.Architecture);
                crw.AdjustLiveOut(flow);
                crw.EnsureSignature(proc, flow);
                crw.AddUseInstructionsForOutArguments(proc);
            }

            foreach (Procedure proc in program.Procedures.Values)
            {
                crw.RewriteCalls(proc);
                crw.RewriteReturns(proc);
            }
        }
Example #4
0
		public GlobalCallRewriter(Program program, ProgramDataFlow mpprocflow, DecompilerEventListener eventListener) : base(program)
		{
			this.mpprocflow = mpprocflow;
		}
Example #5
0
		public static void Rewrite(
            Program program, 
            ProgramDataFlow summaries,
            DecompilerEventListener eventListener)
		{
			GlobalCallRewriter crw = new GlobalCallRewriter(program, summaries, eventListener);
			foreach (Procedure proc in program.Procedures.Values)
			{
                if (eventListener.IsCanceled())
                    return;
				ProcedureFlow flow = crw.mpprocflow[proc];
                flow.Dump(program.Architecture);
				crw.AdjustLiveOut(flow);
				crw.EnsureSignature(proc, flow);
				crw.AddUseInstructionsForOutArguments(proc);
			}

			foreach (Procedure proc in program.Procedures.Values)
			{
                if (eventListener.IsCanceled())
                    return;
                crw.RewriteCalls(proc);
				crw.RewriteReturns(proc);
			}
		}
Example #6
0
		public GlobalCallRewriter(Program prog, ProgramDataFlow mpprocflow) : base(prog)
		{
			this.mpprocflow = mpprocflow;
		}
Example #7
0
 public GlobalCallRewriter(Program program, ProgramDataFlow mpprocflow) : base(program)
 {
     this.mpprocflow = mpprocflow;
 }
Example #8
0
 public GlobalCallRewriter(Program program, ProgramDataFlow mpprocflow, DecompilerEventListener eventListener) : base(program)
 {
     this.mpprocflow = mpprocflow;
 }