3 * kmp_debugger.h -- debugger support.
6 //===----------------------------------------------------------------------===//
8 // The LLVM Compiler Infrastructure
10 // This file is dual licensed under the MIT and the University of Illinois Open
11 // Source Licenses. See LICENSE.txt for details.
13 //===----------------------------------------------------------------------===//
15 #ifndef KMP_DEBUGGER_H
16 #define KMP_DEBUGGER_H
22 /* This external variable can be set by any debugger to flag to the runtime
23 that we are currently executing inside a debugger. This will allow the
24 debugger to override the number of threads spawned in a parallel region by
25 using __kmp_omp_num_threads() (below).
26 * When __kmp_debugging is TRUE, each team and each task gets a unique integer
27 identifier that can be used by debugger to conveniently identify teams and
29 * The debugger has access to __kmp_omp_debug_struct_info which contains
30 information about the OpenMP library's important internal structures. This
31 access will allow the debugger to read detailed information from the typical
32 OpenMP constructs (teams, threads, tasking, etc. ) during a debugging
33 session and offer detailed and useful information which the user can probe
34 about the OpenMP portion of their code. */
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
38 the debugger has changed the number of threads for the parallel region at
39 source file location ident. This way, specific parallel regions' number of
40 threads can be changed at the debugger's request. */
41 int __kmp_omp_num_threads(ident_t const *ident);
47 #endif // KMP_DEBUGGER_H
49 #endif // USE_DEBUGGER