コード例 #1
0
        public static string RenderProcedureHll(Program program, string sProcAddress)
        {
            if (!program.Architecture.TryParseAddress(sProcAddress, out var addr))
            {
                return("");
            }
            if (!program.Procedures.TryGetValue(addr, out var proc))
            {
                return("");
            }
            var sb     = new StringBuilder();
            var writer = new ProcedureRenderer(sb);
            var ar     = new AbsynCodeFormatter(writer);

            ar.Write(proc);
            return(sb.ToString());
        }
コード例 #2
0
        public static string RenderProcedureIR(Program program, string sProcAddress)
        {
            if (!program.Architecture.TryParseAddress(sProcAddress, out var addr))
            {
                return("");
            }
            if (!program.Procedures.TryGetValue(addr, out var proc))
            {
                return("");
            }
            var sb = new StringBuilder();

            var writer = new ProcedureRenderer(sb);
            var ar     = new AbsynCodeFormatter(writer);

            new ProcedureFormatter(proc, new BlockDecorator {
                ShowEdges = false
            }, ar).WriteProcedureBlocks();
            return(sb.ToString());
        }