Guest User

Untitled

a guest
Jul 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. void bt() {
  2. enum { BT_SIZE = 10 }; // Whatever big enough.
  3. int i;
  4. void *btbuf[BT_SIZE];
  5. int btsize = backtrace(btbuf, BT_SIZE);
  6. printf("Backtrace entries: %d\n", btsize);
  7. for(i=0; i<btsize; i++) {
  8. printf("%d: %p\n", i, btbuf[i]);
  9. }
  10. }
Add Comment
Please, Sign In to add comment