1 #if USE_DEBUGGER 2 /* 3 * kmp_debugger.h -- debugger support. 4 */ 5 6 7 //===----------------------------------------------------------------------===// 8 // 9 // The LLVM Compiler Infrastructure 10 // 11 // This file is dual licensed under the MIT and the University of Illinois Open 12 // Source Licenses. See LICENSE.txt for details. 13 // 14 //===----------------------------------------------------------------------===// 15 16 17 #ifndef KMP_DEBUGGER_H 18 #define KMP_DEBUGGER_H 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif // __cplusplus 23 24 /* * This external variable can be set by any debugger to flag to the runtime that we 25 are currently executing inside a debugger. This will allow the debugger to override 26 the number of threads spawned in a parallel region by using __kmp_omp_num_threads() (below). 27 * When __kmp_debugging is TRUE, each team and each task gets a unique integer identifier 28 that can be used by debugger to conveniently identify teams and tasks. 29 * The debugger has access to __kmp_omp_debug_struct_info which contains information 30 about the OpenMP library's important internal structures. This access will allow the debugger 31 to read detailed information from the typical OpenMP constructs (teams, threads, tasking, etc. ) 32 during a debugging session and offer detailed and useful information which the user can probe 33 about the OpenMP portion of their code. 34 */ 35 extern int __kmp_debugging; /* Boolean whether currently debugging OpenMP RTL */ 36 // Return number of threads specified by the debugger for given parallel region. 37 /* The ident field, which represents a source file location, is used to check if the 38 debugger has changed the number of threads for the parallel region at source file 39 location ident. This way, specific parallel regions' number of threads can be changed 40 at the debugger's request. 41 */ 42 int __kmp_omp_num_threads( ident_t const * ident ); 43 44 #ifdef __cplusplus 45 } // extern "C" 46 #endif // __cplusplus 47 48 49 #endif // KMP_DEBUGGER_H 50 51 #endif // USE_DEBUGGER 52