rizinorg / rizin

UNIX-like reverse engineering framework and command-line toolset.
https://rizin.re
GNU Lesser General Public License v3.0
2.69k stars 360 forks source link

An API to get the function BB graph, callgraph, etc #992

Open XVilka opened 3 years ago

XVilka commented 3 years ago

Currently the commands in librz/core/cmd_analysis.c and called functions in librz/core/canalysis.c draw the graph directly. It would be very useful to introduce the API to return such graphs only once in RzGraph data structure, then use such an API in these commands as well.

Also split librz/core/agraph.c into two parts - purely graph things (probably move some of these into RzUtil (librz/util/)), printing parts, and TUI parts (these should go into librz/core/tui/).

Also add unit/integration C tests

ret2libc commented 3 years ago

See as well https://github.com/rizinorg/rizin/pull/637#issuecomment-779973443 . RzGraphDrawable was one first initial attempt by @karliss to improve the situation. I agree we should have some better way to deal with all those graph-drawing commands... How to do that exactly is another story :)

ret2libc commented 3 years ago

@XVilka can we remove this from 0.3.0? With you being loaded with types issues and me on commands, I think we don't have time in the next weeks/month to work on this. WDYT?

XVilka commented 3 years ago

Yes, sure, it's a long term issue.