radareorg / radare2-bindings

Bindings of the r2 api for Valabind and friends
GNU Lesser General Public License v3.0
131 stars 92 forks source link

Get data dependency graph using radare2 #152

Closed roj4s closed 7 years ago

roj4s commented 7 years ago

I want to create a Data dependency graph which is a graph obtained from the control flow graph in which the nodes are instructions and are connected if the instruction in the node use or modify the same memory space, this graph is also known as Program Dependence Graph. If it's not implemented how can I use radare from my own code to get the Control Flow Graph with the instructions in the same format as Capstone. Thanks in advance.

Maijin commented 7 years ago

Why is this an issue in radare2-bindings ?

Maijin commented 7 years ago
import r2pipe

r2 = r2pipe.open("/bin/ls")
r2.cmd('aaa')
print(r2.cmdj("agj @ main"))  # CFG on main
r2.quit()