| 25 | namespace hpx::util { |
| 26 | |
| 27 | void attach_debugger() |
| 28 | { |
| 29 | #if defined(HPX_WINDOWS) |
| 30 | DebugBreak(); |
| 31 | #elif defined(_POSIX_VERSION) && defined(HPX_HAVE_UNISTD_H) |
| 32 | volatile int i = 0; |
| 33 | std::cerr << "PID: " << getpid() << " on " << asio::ip::host_name() |
| 34 | << " ready for attaching debugger. Once attached set i = 1 " |
| 35 | "and continue" |
| 36 | << std::endl; |
| 37 | while (i == 0) |
| 38 | { |
| 39 | sleep(1); |
| 40 | } |
| 41 | #endif |
| 42 | } |
| 43 | } // namespace hpx::util |
no test coverage detected