encounter 'Broken pipe' error only while using step-by-step debug with GDB
There is unix-socket server written on PHP (but I don't think it has something to wit开发者_Python百科h it). Client side is written on c++ and based on boost::asio library. When I launch program normally - everything works fine, except one (not related to socket communication) bug that I obviously want to debug. But when I start step-by-step debugging it I immediately receive 'Broken Pipe' error on the steps which perform write operations on sockets. If breakpoint is set up after socket write operation - everything work fine until the next attempt to step over the write func.
Spent whole day trying to solve this problem, but unsuccessfully...
Had anyone met the same trouble?
- using GDB bundled with xCode 3.2.5 (64-bit) under OS X 10.6.7
GDB
uses signals aggressively. If you want to install signal handlers, check out the following example:
https://github.com/sean-/Boost.Examples/blob/master/asio/timer/timer.cc#L106
精彩评论