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()); }
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()); }