-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more graph widgets #2273
Add more graph widgets #2273
Conversation
Problems found during testing:
|
Both fixed. |
Do you have any idea of what's wrong with Travis and Appveyor? |
Appveyor should be fixed by meson version PR that was just merged. On Travis the macOS build times out. Recent successful builds take 43-48 minutes which isn't too far from 50 minute limit. The annoying part is that ~20 minutes out of that is taken by homebrew update which we have to do because Travis isn't updating their macOS images. See https://github.com/radareorg/cutter/pull/2077 . |
Things noticed while testing:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice refactors, it looks good to me :-)
That's by design you can enter a plain r2 command there. See description of #2178 . Idea is that even when we have dedicated widgets for all graphs a new r2 version might add new graph types. In such situation you can just type the command of new graph without waiting until new widget gets added to Cutter.
As the amount of connected edges increases space is reduced. In my opinion that's better than keeping fixed spacing and having the ends not connect to block and spanning across multiple screens.
There some use-cases for agg. One is commands like ".axg*" which store the resulting graph in "custom graph". So instead of running axgv and obtaining unreadable graph in console widget you can run ".axg*" and then opening agg in the r2 graph widget. Other potential usescase is for display graphs generated by user scripts. The same could be done by making a Cutter plugin which reuses some of Cutter graph classes, but the r2 command interface is somewhat simpler than Cutter API and such script could be run either in plain r2 or Cutter. |
Ok thanks for the details :) LGTM! |
Your checklist for this pull request
Detailed description
Introduce generic r2 graph widget. User can select one of the r2 graph types in the list or enter a command. Since it executes more or less arbitrary r2 command it needs to be manually refreshed using a button.
Add a specialized CallGraphWidget used for global and single function callgraph. Extra features in the callgraph widget compared to generic one:
Expose more graphviz layout engines(sfdp, neato, twopi, circo), might be useful for some of the reference graphs.
GraphGridLayout bugfix for a case with multiple top level blocks. Almost never happens for CFG but is somewhat common in callgraph and some of other r2 graphs
Fix the false dock showing causing RefreshDeferrer to work poorly. This was probably a regression caused by dock layout switching feature.
Code refactoring and other changes:
Test plan (required)
Steps
Closing issues
Closes #2178
Closes #406
Closes #1776