MCPcopy Create free account
hub / github.com/TheHPXProject/hpx / attach_debugger

Function attach_debugger

libs/core/debugging/src/attach_debugger.cpp:27–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace 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

Callers 5

sigsegv_handlerFunction · 0.85
may_attach_debuggerFunction · 0.85
handle_terminationFunction · 0.85
termination_handlerFunction · 0.85

Calls 1

sleepFunction · 0.50

Tested by

no test coverage detected