Skip to content

Commit

Permalink
Add noreturn column in aflt output
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka committed Mar 30, 2021
1 parent fc02740 commit 44c9bdf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions librz/core/canalysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -3834,6 +3834,7 @@ static int fcn_list_table(RzCore *core, const char *q, int fmt) {
rz_table_add_column(t, typeNumber, "xref", 0);
rz_table_add_column(t, typeNumber, "calls", 0);
rz_table_add_column(t, typeNumber, "cc", 0);
rz_table_add_column(t, typeNumber, "noreturn", 0);
rz_list_foreach (core->analysis->fcns, iter, fcn) {
const char *fcnAddr = sdb_fmt("0x%08" PFMT64x, fcn->addr);
const char *fcnSize = sdb_fmt("%" PFMT64u, rz_analysis_function_linear_size(fcn));
Expand All @@ -3849,8 +3850,8 @@ static int fcn_list_table(RzCore *core, const char *q, int fmt) {
const char *callstr = sdb_fmt("%d", rz_list_length(calls));
rz_list_free(calls);
snprintf(ccstr, sizeof(ccstr), "%d", rz_analysis_function_complexity(fcn));

rz_table_add_row(t, fcnAddr, fcnSize, fcn->name, nbbs, xref, callstr, ccstr, NULL);
const char *noret = fcn->is_noreturn ? "yes" : "";
rz_table_add_row(t, fcnAddr, fcnSize, fcn->name, nbbs, xref, callstr, ccstr, noret, NULL);
}
if (rz_table_query(t, q)) {
char *s = (fmt == 'j')
Expand Down

0 comments on commit 44c9bdf

Please sign in to comment.