()
| 268 | |
| 269 | |
| 270 | def _load_python_helper_lib_uncached(): |
| 271 | if ( |
| 272 | not IS_CPYTHON |
| 273 | or sys.version_info[:2] > (3, 11) |
| 274 | or hasattr(sys, "gettotalrefcount") |
| 275 | or LOAD_NATIVE_LIB_FLAG in ENV_FALSE_LOWER_VALUES |
| 276 | ): |
| 277 | pydev_log.info("Helper lib to set tracing to all threads not loaded.") |
| 278 | return None |
| 279 | |
| 280 | try: |
| 281 | filename = get_python_helper_lib_filename() |
| 282 | if filename is None: |
| 283 | return None |
| 284 | # Load as pydll so that we don't release the gil. |
| 285 | lib = ctypes.pydll.LoadLibrary(filename) |
| 286 | pydev_log.info("Successfully Loaded helper lib to set tracing to all threads.") |
| 287 | return lib |
| 288 | except: |
| 289 | if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 1: |
| 290 | # Only show message if tracing is on (we don't have pre-compiled |
| 291 | # binaries for all architectures -- i.e.: ARM). |
| 292 | pydev_log.exception("Error loading: %s", filename) |
| 293 | return None |
| 294 | |
| 295 | |
| 296 | def set_trace_to_threads(tracing_func, thread_idents=None, create_dummy_thread=True): |
no test coverage detected