Skip to content

Commit

Permalink
Added agA global graph and agR global graph
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanpencil authored and radare committed May 22, 2018
1 parent 47acc3c commit 4c040ae
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
3 changes: 0 additions & 3 deletions libr/core/canal.c
Expand Up @@ -1729,9 +1729,6 @@ R_API void r_core_anal_datarefs(RCore *core, ut64 addr) {
r_cons_printf ("age %s %s\n", me, dst);
}
}
if (!found) {
eprintf ("No data refs in this function.\n");
}
r_list_free (refs);
} else {
eprintf ("Not in a function. Use 'df' to define it.\n");
Expand Down
56 changes: 56 additions & 0 deletions libr/core/cmd_anal.c
Expand Up @@ -5951,6 +5951,34 @@ static void cmd_anal_graph(RCore *core, const char *input) {
break;
}
break;
case 'R': // "agR" global refs
switch (input[1]) {
case 'v':
case 't':
case 'd':
case 'J':
case 'j':
case 'g':
case 'k':
case 'w':
case ' ':
case 0: {
r_core_cmdf (core, "ag-; .agR*; agg%c;", input[1]);
break;
}
case '*': {
RListIter *it;
RAnalFunction *fcn;
r_list_foreach (core->anal->fcns, it, fcn) {
r_core_anal_coderefs (core, fcn->addr);
}
break;
}
default:
eprintf ("Usage: see ag?\n");
break;
}
break;
case 'x': // agx "cross refs"
switch (input[1]) {
case 'v':
Expand Down Expand Up @@ -6095,6 +6123,34 @@ static void cmd_anal_graph(RCore *core, const char *input) {
break;
}
break;
case 'A': // "agA" global data refs
switch (input[1]) {
case 'v':
case 't':
case 'd':
case 'J':
case 'j':
case 'g':
case 'k':
case 'w':
case ' ':
case 0: {
r_core_cmdf (core, "ag-; .agA*; agg%c;", input[1]);
break;
}
case '*': {
RListIter *it;
RAnalFunction *fcn;
r_list_foreach (core->anal->fcns, it, fcn) {
r_core_anal_datarefs (core, fcn->addr);
}
break;
}
default:
eprintf ("Usage: see ag?\n");
break;
}
break;
case 'd': // "agd"
switch (input[1]) {
case 'v':
Expand Down

0 comments on commit 4c040ae

Please sign in to comment.