]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/engine/debugger.h
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / src / engine / debugger.h
1 /*
2 * Copyright 2015 Steven Watanabe
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
6 */
7
8 #ifndef DEBUGGER_SW20150314_H
9 #define DEBUGGER_SW20150314_H
10
11 #include <setjmp.h>
12 #include "object.h"
13 #include "frames.h"
14
15 #ifdef JAM_DEBUGGER
16
17 void debug_on_instruction( FRAME * frame, OBJECT * file, int line );
18 void debug_on_enter_function( FRAME * frame, OBJECT * name, OBJECT * file, int line );
19 void debug_on_exit_function( OBJECT * name );
20 int debugger( void );
21
22 struct debug_child_data_t
23 {
24 int argc;
25 const char * * argv;
26 jmp_buf jmp;
27 };
28
29 extern struct debug_child_data_t debug_child_data;
30 extern LIST * debug_print_result;
31 extern const char debugger_opt[];
32 extern int debug_interface;
33
34 #define DEBUG_INTERFACE_CONSOLE 1
35 #define DEBUG_INTERFACE_MI 2
36 #define DEBUG_INTERFACE_CHILD 3
37
38 #define debug_is_debugging() ( debug_interface != 0 )
39 #define debug_on_enter_function( frame, name, file, line ) \
40 ( debug_is_debugging()? \
41 debug_on_enter_function( frame, name, file, line ) : \
42 (void)0 )
43 #define debug_on_exit_function( name ) \
44 ( debug_is_debugging()? \
45 debug_on_exit_function( name ) : \
46 (void)0 )
47
48 #if NT
49
50 void debug_init_handles( const char * in, const char * out );
51
52 #endif
53
54 #else
55
56 #define debug_on_instruction( frame, file, line ) ( ( void )0 )
57 #define debug_on_enter_function( frame, name, file, line ) ( ( void )0 )
58 #define debug_on_exit_function( name ) ( ( void )0 )
59 #define debug_is_debugging() ( 0 )
60
61 #endif
62
63 #endif