Skip to content
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

Support every output format for the xrefs graph (agx) #10084

Merged
merged 3 commits into from May 13, 2018

Conversation

cyanpencil
Copy link
Contributor

Added the new command agx which displays the graph of all the references to the address given. For now it shows only hex offsets, but I was thinking on adding maybe more information in the body of the nodes (e.g. the disasm of the instruction or the which function the referencing instruction is in) in another pr.

Fixed also some bugs with aggv and agfv, in particular the mouse wheel was broken (printed garbage) when exiting from them.

Fix another crash for the interactive custom graph

Fix scroll wheel after exiting interactive graph

Fix whitespace
@radare
Copy link
Collaborator

radare commented May 12, 2018 via email

@@ -3847,6 +3856,9 @@ R_API int r_core_visual_graph(RCore *core, RAGraph *g, RAnalFunction *_fcn, int
}
break;
case 'S':
if (!fcn) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use if (fcn) { graph_single_step...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok will change it in a moment

break;
case ')':
rotateAsmemu (core);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this needs a fcn to work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is not rotateAsmemu (core) itself, but it's the next instruction, g->need_reload_nodes...
In fact if need_reload_nodes is set the next time check_changes () is called it will call agraph_reload_nodes (), which does a r_agraph_reset () (that deletes every node in the graph) and after that a reload_nodes (), which calls get_bbnodes () that should create again the graph from scratch, but if fcn is NULL, it simply exits without doing anything.

The consequence is that if I create a custom graph and display it with aggv and then I press ')' the graph I built is lost.

@radare radare merged commit 367c24a into radareorg:master May 13, 2018
@radare
Copy link
Collaborator

radare commented May 13, 2018

Thanks!

SakiiR pushed a commit to SakiiR/radare2 that referenced this pull request Jul 1, 2019
* add agx xrefs graph
* Fix various crashes if the interactive graph was custom (aggv)
* Fix scroll wheel after exiting interactive graph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants