Time to post about all the issues I had while using (or more precisely, while debugging inside) Code::Blocks during my latest internship. Today I’ll deal with that strange message that seemed to pop up randomly while debugging with GDB:
Program received signal SIGTRAP, Trace/breakpoint trap.
In ntdll!TpWaitForAlpcCompletion () (C:\Windows\system32\ntdll.dll)
Of course, the message itself wouldn’t be much trouble, if it were not for the fact that it stops the debugger like a breakpoint with no way to resume (long story short: thus I couldn’t run the debugger until I reach my real breakpoints…).
I eventually managed to find some workaround: in the global debugger settings (Settings -> Compiler and debugger -> Debugger settings), enter the following in the Debugger initialization commands field:
handle SIGTRAP noprint nostop
This basically tells the debugger not to display SIGTRAP issues and, more importantly, not to stop on them. Note, however, that:
- The debugger will still be a bit slowed down: I noticed that it regularly briefly drops to 0% CPU usage before filling its core again. So I think every time it reaches a SIGTRAP it halts then carries on more or less immediately.
- When you get those SIGTRAPs it probably means there’s something wrong somewhere in your code. In my case indeed I had some naughty memory access violation (I’ll make a short post about it separately when I find the time)
Sources that helped:
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.