• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #882

31 Aug 2023 07:44PM UTC coverage: 41.798% (-44.7%) from 86.546%
#882

push

19442 of 46514 relevant lines covered (41.8%)

126375.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/libs/core/debugging/src/attach_debugger.cpp
1
//  Copyright (c) 2007-2012 Hartmut Kaiser
2
//  Copyright (c) 2017      Denis Blank
3
//
4
//  SPDX-License-Identifier: BSL-1.0
5
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
6
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7

8
#include <hpx/config.hpp>
9
#include <hpx/debugging/attach_debugger.hpp>
10

11
#include <iostream>
12

13
#if defined(HPX_HAVE_UNISTD_H)
14
#include <unistd.h>
15
#endif
16

17
#if defined(HPX_WINDOWS)
18
#include <Windows.h>
19
#endif
20

21
#if defined(_POSIX_VERSION)
22
#include <asio/ip/host_name.hpp>
23
#endif
24

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
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc