Skip to content

Commit

Permalink
Additional fixes in agd output format
Browse files Browse the repository at this point in the history
Fix rebase

Fix whitespace
  • Loading branch information
cyanpencil authored and radare committed May 18, 2018
1 parent 9a510f2 commit 6e7e64f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
1 change: 0 additions & 1 deletion libr/anal/diff.c
Expand Up @@ -225,7 +225,6 @@ R_API int r_anal_diff_fcn(RAnal *anal, RList *fcns, RList *fcns2) {
}
*/
if (fcn->diff->type != R_ANAL_DIFF_TYPE_NULL) {
eprintf ("Function %s already diffed\n", fcn->name);
continue;
}
ot = 0;
Expand Down
4 changes: 2 additions & 2 deletions libr/core/canal.c
Expand Up @@ -1732,11 +1732,11 @@ R_API void r_core_anal_datarefs(RCore *core, ut64 addr) {
}
}
if (!found) {
eprintf("No data refs in this function.\n");
eprintf ("No data refs in this function.\n");
}
r_list_free (refs);
} else {
eprintf("Not in a function. Use 'df' to define it.\n");
eprintf ("Not in a function. Use 'df' to define it.\n");
}
}

Expand Down
16 changes: 10 additions & 6 deletions libr/core/cmd_anal.c
Expand Up @@ -6092,15 +6092,19 @@ static void cmd_anal_graph(RCore *core, const char *input) {
case 'k':
case '*':
case ' ':
eprintf ("Currently the only supported formats for the diff graph are 'd' and 'w'\n");
break;
case 0:
case 'd':
r_core_anal_graph (core, r_num_math (core->num, input + 2), R_CORE_ANAL_GRAPHBODY | R_CORE_ANAL_GRAPHDIFF);
eprintf ("Currently the only supported formats for the diff graph are 'agdd' and 'agdw'\n");
break;
case 'd': {
ut64 addr = input[2]? r_num_math (core->num, input + 2): core->offset;
r_core_gdiff_fcn (core, addr, core->offset);
r_core_anal_graph (core, addr, R_CORE_ANAL_GRAPHBODY | R_CORE_ANAL_GRAPHDIFF);
break;
}
case 'w': {
char *cmdargs = r_str_newf ("agdd %lld", r_num_math (core->num, input + 2));
char *cmd = r_core_graph_cmd (cmdargs);
char *cmdargs = r_str_newf ("agdd %lld",
input[2] ? r_num_math (core->num, input + 2) : core->offset);
char *cmd = r_core_graph_cmd (core, cmdargs);
if (cmd && *cmd) {
r_core_cmd0 (core, cmd);
}
Expand Down

0 comments on commit 6e7e64f

Please sign in to comment.