When some assert() fails, gdb breaks but doesn't show the aborting thread. In case of a signal (like a segfault), it works fine. Is there an easy way to know what threads has just a开发者_C百科borted?
Esp., I am using Xcode here.
You can write your own assert
marco which sends SIGSEGV
instead of SIGABRT
.
#define assert(check) do { if(!(check)) kill (getpid(), SIGSEGV); } while(0)
精彩评论