Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void bt() {
- enum { BT_SIZE = 10 }; // Whatever big enough.
- int i;
- void *btbuf[BT_SIZE];
- int btsize = backtrace(btbuf, BT_SIZE);
- printf("Backtrace entries: %d\n", btsize);
- for(i=0; i<btsize; i++) {
- printf("%d: %p\n", i, btbuf[i]);
- }
- }
Add Comment
Please, Sign In to add comment