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

@cyanpencil cyanpencil commented May 12, 2018

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.

cyanpencil added 2 commits May 12, 2018
Fix another crash for the interactive custom graph

Fix scroll wheel after exiting interactive graph

Fix whitespace
@radare
Copy link
Collaborator

@radare radare commented May 12, 2018

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

This comment has been minimized.

@radare

radare May 12, 2018
Collaborator

use if (fcn) { graph_single_step...

This comment has been minimized.

@cyanpencil

cyanpencil May 12, 2018
Author Contributor

ok will change it in a moment

break;
case ')':
rotateAsmemu (core);

This comment has been minimized.

@radare

radare May 12, 2018
Collaborator

why this needs a fcn to work?

This comment has been minimized.

@cyanpencil

cyanpencil May 12, 2018
Author Contributor

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
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@radare
Copy link
Collaborator

@radare 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants