0

How to accomplish GenFuncGdl? I mean, what idc functions are used to accomplish GenFuncGdl? I look up idc.py, about this function:

def GenFuncGdl(outfile, title, ea1, ea2, flags):
"""
Generate a flow chart GDL file

@param outfile: output file name. GDL extension will be used
@param title: graph title
@param ea1: beginning of the area to flow chart
@param ea2: end of the area to flow chart.
@param flags: combination of CHART_... constants

@note: If ea2 == BADADDR then ea1 is treated as an address within a function.
       That function will be flow charted.
"""
return idaapi.gen_flow_graph(outfile, title, None, ea1, ea2, flags)

from there, we just know that simply call idaapi.gen_flow_graph.

In fact, I need to reverse a function flow, because there are many branches in this function, I do not know how to recognize branch chunks. only check jump instruction, Maybe?

Neitsa
  • 7,693
  • 1
  • 28
  • 45
Keen
  • 1
  • 1
  • 3

1 Answers1

0

As you saw, idaapi.gen_flow_graph will just call a native c++ IDA function.

Your question isn't clear about what you are trying to achieve exactly (finding chunks in the GDL file?)

If you just want to find a function chunks then you can use idautils.Chunks() function which returns a python generator with the start and end addresses of all chunks in a function.

Neitsa
  • 7,693
  • 1
  • 28
  • 45
  • I want to achieve a flow graph for each function, just like the results of idaapi.gen_flow_graph, but i do not want call that. I know there will be a GDL format file if calling gen_flow_graph, a clumsy way to achieve my goal is to parse that GDL file. – Keen May 01 '15 at 19:56