1
// (C) Copyright Gennadiy Rozental 2006-2008.
2
// Distributed under the Boost Software License, Version 1.0.
3
// (See accompanying file LICENSE_1_0.txt or copy at
4
// http://www.boost.org/LICENSE_1_0.txt)
6
// See http://www.boost.org/libs/test for the library home page.
10
// Version : $Revision: 49312 $
12
// Description : defines portable debug interfaces
13
// ***************************************************************************
15
#ifndef BOOST_TEST_DEBUG_API_HPP_112006GER
16
#define BOOST_TEST_DEBUG_API_HPP_112006GER
19
#include <boost/test/detail/config.hpp>
20
#include <boost/test/utils/callback.hpp>
21
#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
26
#include <boost/test/detail/suppress_warnings.hpp>
28
//____________________________________________________________________________//
34
// ************************************************************************** //
35
// ************** check if program is running under debugger ************** //
36
// ************************************************************************** //
38
bool BOOST_TEST_DECL under_debugger();
40
// ************************************************************************** //
41
// ************** cause program to break execution ************** //
42
// ************** in debugger at call point ************** //
43
// ************************************************************************** //
45
void BOOST_TEST_DECL debugger_break();
47
// ************************************************************************** //
48
// ************** gui debugger setup ************** //
49
// ************************************************************************** //
51
struct dbg_startup_info {
53
bool break_or_continue;
54
unit_test::const_string binary_path;
55
unit_test::const_string display;
56
unit_test::const_string init_done_lock;
59
typedef unit_test::callback1<dbg_startup_info const&> dbg_starter;
61
// ************************************************************************** //
62
// ************** debugger setup ************** //
63
// ************************************************************************** //
65
#if BOOST_WORKAROUND( BOOST_MSVC, <1300)
67
std::string BOOST_TEST_DECL set_debugger( unit_test::const_string dbg_id );
71
std::string BOOST_TEST_DECL set_debugger( unit_test::const_string dbg_id, dbg_starter s = dbg_starter() );
76
// ************************************************************************** //
77
// ************** attach debugger to the current process ************** //
78
// ************************************************************************** //
80
bool BOOST_TEST_DECL attach_debugger( bool break_or_continue = true );
82
// ************************************************************************** //
83
// ************** switch on/off detect memory leaks feature ************** //
84
// ************************************************************************** //
86
void BOOST_TEST_DECL detect_memory_leaks( bool on_off );
88
// ************************************************************************** //
89
// ************** cause program to break execution in ************** //
90
// ************** debugger at specific allocation point ************** //
91
// ************************************************************************** //
93
void BOOST_TEST_DECL break_memory_alloc( long mem_alloc_order_num );
99
#include <boost/test/detail/enable_warnings.hpp>