I am working on a server programming on linux machine using epoll and I have a problem with debugging. Right now I have placed log statements all over the place. It helps to see when it blows up but it is hard to see why..
So I was wondering if there is a way to print a stack trace or something more information in C++.
Thanks in advance…
edit:
I set -g in mu make file and if I run my server on GDB then it won’t receive any packets. I don’t know why but If I run this on command line then it receives packets but if I run this on GDB it doesn’t receive anything from client(I can not see any log statements)
Try the
backtracefunction in Glibc.