8 compare (const void *p1
, const void *p2
)
11 int n
= backtrace (ba
, sizeof (ba
) / sizeof (ba
[0]));
14 char **names
= backtrace_symbols (ba
, n
);
18 printf ("called from %s\n", names
[0]);
19 for (i
= 1; i
< n
; ++i
)
20 printf (" %s\n", names
[i
]);
25 return *(const uint32_t *) p1
- *(const uint32_t *) p2
;
30 main (int argc
, char *argv
[])
35 for (cnt
= 0; cnt
< sizeof (arr
) / sizeof (arr
[0]); ++cnt
)
38 qsort (arr
, sizeof (arr
) / sizeof (arr
[0]), sizeof (arr
[0]), compare
);
40 for (cnt
= 0; cnt
< sizeof (arr
) / sizeof (arr
[0]); ++cnt
)
41 printf ("%" PRIx32
"\n", arr
[cnt
]);